* src/pic16/pcode.c (pic16_newpCodeOpLit12),
[fw/sdcc] / ChangeLog
1 2006-04-28 Raphael Neider <rneider AT web.de>
2
3         * src/pic16/pcode.c (pic16_newpCodeOpLit12),
4         * src/pic16/gen.c (pic16_popGetLit12): NEW, create 12 bit literal,
5           (pic16_loadFSR0): handle 12 bit literals correctly, fixes #1440527
6         * src/pic16/pcode.h: added prototype for pic16_newpCodeOpLit12()
7
8 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
9
10         * device/lib/pic/libdev/Makefile.in,
11         * device/lib/hc08/Makefile.in,
12         * device/lib/gbz80/Makefile.in,
13         * device/lib/z80/Makefile.in,
14         * device/lib/ds390/Makefile.in,
15         * device/lib/ds400/Makefile.in: added srcdir to include search path,
16         thanks to Borut for the bug report
17         * configure.in,
18         * configure: always create doc/Makefile independent from --enable-doc
19         * Makefile.in: always install from directory doc independent from
20         --enable-doc
21         * device/lib/pic/Makefile.in: added libdev again, it was erroneously
22         removed
23         * device/lib/pic/libdev/Makefile.in: fixed VPATH build
24         * doc/Makefile.in: install *.txt if present
25         * device/include/Makefile.in (install): added installation of pic/*.inc
26         and pic/*.txt files again, they were erroneously removed
27
28 2006-04-28 Raphael Neider <rneider AT web.de>
29
30         * src/pic/{gen.c,main.h,pcode.c},
31         * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
32             concerning signedness with casts
33
34 2006-04-28 Raphael Neider <rneider AT web.de>
35
36         * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
37             definition of an interrupt handler,
38         * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
39             interrupt handler stuff from picglue() to separate routine,
40           (picglue): enabled definition of intr handlers in files w/o main()
41
42 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
43
44         * support/librarian/sdcclib.c: moved include <limits.h> up to enable
45           compilation with MSVC 2005 Express Edition (VC8)
46
47 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
48
49         * device/lib/Makefile: fixed build of gbz80 lib
50
51 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
52
53         * support/regression/tests/bug-460010.c,
54         * support/regression/tests/bug-524691.c,
55         * support/regression/tests/bug-716242.c: removed conditional defines
56           that are already in testfwk.h
57
58 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
59
60         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
61           (AccAXRsh1): added, shift right by 1,
62           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
63            AccAXLrl1
64         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
65
66 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
67
68         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
69         remove cast to same type
70         * src/SDCCast.c (decorateType): fix for RFE 1475742,
71         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
72         * as/z80/Makefile,
73         * link/z80/Makefile: removed, they have moved to
74         Makefile.in files
75         * configure,
76         * configure.in: replaced duplicate message about ucsim by missing sdcpp
77         * install-sh: fix bug #1204398 by setting umask 0022
78         * device/lib/Makefile: separate build of z80 and gbz80 lib
79
80 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
81
82         Enabled VPATH feature: changed nearly all Makefiles (149 files).
83         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
84
85         One basic decision: e.g. src/clean.mk includes further files. In order
86         to make this work there are two solutions:
87         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
88           run configure on them. This way they can use
89           'include $(srcdir)/port-clean.mk'
90         - always include clean.mk by the Makefile at the same level. To avoid
91           that `make clean` tries to include and build Makefile.dep the
92           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
93           implemented, because now even `make uninstall` doesn't create
94           Makefile.in. clean.mk could be eliminated by pasting it in
95           Makefile.in.
96
97         * debugger/mcs51/Makefile.in: build own objects from library sources
98         (SLIB, SDCC) in current directory
99
100         * configure, configure.in: renamed --disable-device-lib-build in
101         --disable-device-lib; added --enable-doc, the required tools are
102         searched by configure; added result message; the toolchain for the
103         belonging ports are now only built, if the port is enabled.
104
105         * support/regression/*: all output is written in directory gen, because
106         the fwk and ports directories don't livet in the build tree using vpath
107
108         * doc/sdccman.lyx: renamed --disable-device-lib-build to
109         --disable-device-lib, added --enable-doc, added section VPATH
110
111         * sim/ucsim/configure.in,
112         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
113         z80 are enabled by default
114
115 2006-04-24 Raphael Neider <rneider AT web.de>
116
117         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
118             to config word, "pic14_"-prefixed some extern functions
119           (pic14_emitConfigWord): emit __config directive(s) if assignment to
120             config word has been found
121         * src/pic/device.h: added prototypes
122         * src/pic/pcode.c: added "pic14_"-prefix where needed
123         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
124             fixup
125         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
126             words,
127           (pic14emitRegularMap): ignore config words,
128           (pic14createInterruptVect): moved generating __config directives away
129           (picglue): have __config directives emitted
130
131 2006-04-24 Borut Razem <borut.razem AT siol.net>
132
133         * doc/Makefile: sync with nightly build makefile
134
135 2006-04-24 Raphael Neider <rneider AT web.de>
136
137         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
138             registers that have not been assigned proper liveranges,
139             fixes #1469504 and #1474602,
140           (pCodeRegOptimizeRegUsage): fixed typo in comment
141
142 2006-04-24 Borut Razem <borut.razem AT siol.net>
143
144         * device/examples/main8051.c: deleted - it was removed from CVS
145           24.mar.2000 and after that modified 18.feb.2001, so it reappered
146           after the transition to Subversion
147         * src/SDCCalloc.h: deleted - it was removed  from CVS
148           3.feb.2001 and after that modified 18.feb.2001, so it reappered
149           after the transition to Subversion
150         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
151           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
152           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
153           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
154
155 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
156
157         * as/asx8051.dsp: added mcs51/strcmpi.h
158         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
159         * as/hc08/aslink.h: updated lnksect prototype
160         * as/hc08/asm.h,
161         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
162         * as/hc08/asmain.c,
163         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
164           (newdot): handle A_ABS
165         * as/hc08/asout.c,
166         * as/mcs51/asout.c (outarea): output address
167         * as/hc08/lkaomf51.c,
168         * as/mcs51/lkaomf51.c: disabled unused array UsageType
169         * as/hc08/m08pst.c,
170         * as/mcs51/i51pst.c,
171         * as/z80/z80pst.c: "ABS" is not A_OVR
172         * as/hc08/lkarea.c (newarea): read a_addr,
173           (lnkarea): added codemap array, sort absolute areas to the front,
174            combine all GSINITx/GSFINAL,
175           (find_empty_space, allocate_space): new functions,
176           (lnksect): return next address, handle absolute sections
177         * as/mcs51/lkarea.c (newarea): read a_addr,
178           lnksect2 prototype changed,
179           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
180           (find_empty_space, allocate_space): new, factored out of lnksect2,
181           (lnksect2): return next address, handle absolute sections
182         * as/hc08/lkhead.c,
183         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
184         * as/hc08/lklibr.c (addfile, fndsym),
185         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
186           index out of range and detect both '\' and '/'
187         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
188         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
189           regression tests (ds390 cannot return bool yet)
190         * doc/sdccman.lyx: changed version number, document changed --no-peep,
191           document critical interrupts on z80, document changed SDCC define
192         * src/asm.c (_asxxxx_mapping): fixed .org directive,
193           (_a390_mapping): added .org directive
194         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
195           (genMultOneByte): fixed warnings
196         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
197           ones
198         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
199         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
200           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
201         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
202         * src/pic16/main.c: removed newReg prototype
203         * src/pic16/pcode.c,
204         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
205           warnings
206         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
207           ones
208         * src/pic16/ralloc.c
209         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
210           to fix warnings
211         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
212           from short to PIC_OPTYPE
213         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
214         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
215           optype from short to PIC_OPTYPE
216         * src/port.h: made int_size unsigned to fix warnings
217         * src/SDCC.y: fixed warning on MSVC
218         * src/SDCCicode.c (getArraySizePtr): return unsigned int
219         * src/SDCCopt.c (convertToFcall): fixed warnings
220         * src/SDCCsymt.h: removed double prototype for genSymName
221         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
222           offset int to fix warnings
223
224 2006-04-22 Borut Razem <borut.razem AT siol.net>
225
226         * doc/sdccman.lyx, */Makefile, */Makefile.in:
227           references to CVS replaced with Subversion
228
229 2006-04-21 Borut Razem <borut.razem AT siol.net>
230
231         * doc/sdccman.lyx, */Makefile, */Makefile.in:
232           references to CVS replaced with Subversion
233
234 2006-04-19 Borut Razem <borut.razem AT siol.net>
235
236         * src/version.awk: adapted for svn
237         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
238           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
239           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
240           /binutils-avr/etc/*.vi, *.jin: removed all properties
241           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
242
243 2006-04-19 Borut Razem <borut.razem AT siol.net>
244
245         * CVS to Subversion migration completed
246
247 2006-04-18 Borut Razem <borut.razem AT siol.net>
248
249         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
250           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
251
252 2006-04-17 Borut Razem <borut.razem AT siol.net>
253
254         * device/include/Makefile.in: added pic/*.inc to the installation
255
256 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
257
258         * support/regression/collate-results.py: fixed output in case of
259         a valdiag error
260         * support/regression/generate-cases.py: fixed splitting of pathnames
261         with dots
262         * as/hc08/lklibr.c (addfile),
263         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
264
265 2006-04-11 Raphael Neider <rneider AT web.de>
266
267         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
268         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
269         * src/pic16/pcode.c (assignValnums): fixed #1460578
270
271 2006-04-11 Raphael Neider <rneider AT web.de>
272
273         * device/lib/pic/libdev/*.c,
274         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
275           fixes #1468739, enables compilation in --std-c99 mode
276         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
277
278 2006-04-11 Raphael Neider <rneider AT web.de>
279
280         * src/pic/device.c (find_device): removed debug output
281           (list_valid_pics): enabled verbose listing of supported devices
282         * device/include/stdbool.h: define bool as char for pic14/16 as well
283
284 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
285
286         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
287
288 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
289
290         * .version: bumped version to 2.5.6
291         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
292
293 2006-04-06 Raphael Neider <rneider AT web.de>
294
295         * .version: bumped version to 2.5.6 (pic14 ABI changed)
296         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
297         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
298           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
299             pic14_constructAbsMap
300           (pic14printPublics): declare absolute global symbols as global
301           (pic14createInterruptVect),
302         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
303           (newReg): assume new registers unused, use correct name in
304             hashtable (reg->name instead of name), more debugLog output
305         * src/pic/device.h (PIC_device): added fields for verbose output
306         * src/pic/device.c: moved device definition to pic14devices.txt,
307             added routines for runtime parsing of pic14devices.txt,
308             added support for second config word
309         * src/pic/main.c (_process_pragma): removed #pragma maxram,
310           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
311           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
312           (_pic14_parseOptions): moved pCodeInitRegisters here
313           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
314         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
315           (pCodeInitRegisters): rewrapped comments, perpared new approach to
316             handling the pseudo stack
317         * device/lib/Makefile.in: ignore failures in objects-pic16,
318         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
319         * device/lib/pic/NEWS: document new dependency on picXXX.lib
320         * device/lib/pic/Makefile.subdir,
321         * device/lib/pic16/Makefile.subdir: improved clean rules
322         * device/lib/pic/libdev/: NEW, pic14 device libraries
323         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
324         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
325         * device/include/Makefile.in: create subdir and install pic14 headers
326         * device/include/pic/p16f_common.inc: removed unused declarations
327         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
328             PICs from inc2h.pl v1.6,
329             replaced BIT_AT macros with struct declarations
330         * device/include/pic/pic14devices.txt: definition of supported devices,
331             all above improvements contributed by Zik Saleeba, thanks
332         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
333         * support/scripts/sdcc.nsi: also install pic14 device libraries and
334             headers
335
336 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
337
338         * device/include/mcs51/c8051f410.h: added interrupt numbers,
339         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
340           thanks to Charles Olds
341
342 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
343
344         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
345
346 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
347
348         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
349         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
350         * support/regression/bug1464657.c: added, new test
351
352 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
353
354         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
355           version number
356
357 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
358
359         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
360           --no-peep and --peep-file <file> are used don't use default rules but
361           do use the <file>
362
363 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
364
365         * src/mcs51/gen.c (genCall): fixed bug 1457608
366
367 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
368
369         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
370         changes seem to cause (trigger?) problems with the build system.
371
372 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
373
374         * src/SDCCpeeph.c (operandsLiteral): new, added,
375           (callFuncByName): inserted operandsLiteral
376         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
377
378 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
379
380         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
381         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
382
383 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
384
385         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
386           implemented patch 1120823 Thanks to Willy De la Court (normal
387           interrupts need an interrupt number now if they are made critical),
388           and enabled nesting of critical functions though not for gbz80
389           (genCritical, genEndCritical): added functions
390           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
391         * src/z80/mappings.i: added "ei" to all mappings
392
393 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
394
395         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
396         submitted by the Debian SDCC maintainer Aurelien Jarno:
397         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
398         archive with gcc 4.1 on mips and wrote the patch"
399
400 2006-03-16 Raphael Neider <rneider AT web.de>
401
402         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
403           the left operand is shorter than the result (c* = lit-c* + int),
404           fixes bug #1450796
405         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
406           OP_SYMBOL
407
408 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
409
410         * src/.version: increased version number to 2.5.5
411         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
412         linking is done manually in pic16 port's _linkEdit,
413         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
414         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
415         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
416         allocate asmop as AOP_ACC,
417         (aopForRemat): added parameter 'bool result' in function declaration,
418         (pic16_aopGet): return AOP_ACC when accessing WREG,
419         (pic16_popGetTempReg): minor modification,
420         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
421         'pic16_allocWithIdx',
422         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
423         calling function in absolute addresses,
424         (genAssign): take into account AOP_ACC asmop,
425         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
426         * src/pic16/pcoderegs.c: some debug functions and lines added,
427         * src/pic16/ralloc.c (decodeRegType): added but commented out,
428         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
429         register too,
430         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
431         call to allocReg, not by manually allocating a new one,
432         (pic16_assignRegisters): now before going through the register
433         allocating functions mark all registers as free. This eliminates some
434         side effects resulting from peephole parser done earlier in the backbone
435
436 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
437
438         * src/SDCCicode.c (geniCodeLogic),
439         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
440
441 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
442
443         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
444           (genSend): bugfix, do not allocate and free twice,
445           (shiftRLong): handle partially overlapping aops
446         * support/regression/tests/bitopcse.c: fixed warning redefined idata
447
448 2006-03-08 Borut Razem <borut.razem AT siol.net>
449
450         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
451           for pic16
452
453 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
454
455         * support/regression/tests/bug1409955.c: new, added
456         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
457         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
458           (aopForSym, aopOp): increment asmop.allocated if reused,
459           (freeAsmop): decrement asmop.allocated and check for zero instead of
460           using asmop.freed,
461           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
462           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
463            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
464            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
465            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
466            genSignedRightShift, genRightShift, genDataPointerGet,
467            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
468            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
469             in reverse order from allocation,
470           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
471             added swappedLR to keep track
472         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
473           pdata & code for GCC, z80, gbz80 & hc08
474         * support/regression/tests/zeropad.c: moved defines to testfwk.h
475
476 2006-03-08 Raphael Neider <rneider AT web.de>
477
478         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
479
480 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
481
482         * device/include/mcs51/c8051f410.h: new SiLabs mcu
483         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
484         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
485
486 2006-03-06 Borut Razem <borut.razem AT siol.net>
487
488         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
489           made the linker quiet
490
491 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
492
493         * src/pic16/gen.c (genPcall): fixed bug #1443644
494         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
495         which dumps before the function entry point a data byte which represents
496         the number of the local variables used by the specified function, added
497         'xinst' for initial support for Extended Instruction Support,
498         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
499         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
500         port->fun_prefix anymore (may change later),
501         (genFunction, genEndFunction): do not store/restore local registers for
502         _main (this should take care the --main-return command line option in
503         the future),
504         (genOr): removed some legacy pic-port instructions,
505         * src/pic16/genarith.c (genAddLit): re-enabled old code because
506         performing operations with SFR's causes data to be written more than
507         once to each SFR. Perhaps SFRs should be handled in special cases...
508         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
509         pcode.h
510         * src/pic16/main.c (_process_pragma): stack bound checking did not take
511         into account for stack starting position,
512         (struct OPTIONS pic16_optionsTable): added command line argument
513         --extended or -y for Extended Instruction Support,
514         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
515         (deassignLRs): *** perhaps the most important change, old 'for' code
516         (commented out for reference), didn't account for some registers which
517         were left marked 'not free' after a pointer operation. The change
518         reduces register usage a lot in some cases
519
520 2006-03-04 Borut Razem <borut.razem AT siol.net>
521
522         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
523           _clean
524         * support/regression/tests/bug-524697.c: decreased array size for
525           mcs51 to fit into the internal RAM
526         * support/regression/Makefile.in: a little bit more verbose
527
528 2006-03-03 Borut Razem <borut.razem AT siol.net>
529
530         * support/regression/fwk/lib/testfwk.c,
531           support/regression/fwk/include/testfwk.h: introduced function
532           _prints(), nonrecursive _printn(), call _initEmu() from main()
533         * support/regression/ports/gbz80/support.asm,
534           support/regression/ports/ucz80/support.asm,
535           support/regression/ports/z80/support.asm,
536           support/regression/ports/ds390/support.c,
537           support/regression/ports/hc08/support.c,
538           support/regression/ports/host/support.c,
539           support/regression/ports/mcs51/support.c,
540           support/regression/ports/xa51/support.c: added empty _initEmu()
541           function
542         * support/regression/ports/pic16/gpsim.cmd,
543           support/regression/ports/pic16/spec.mk,
544           support/regression/ports/pic16/support.c,
545           support/regression/Makefile.in: added pic16 regression test
546
547 2006-03-01 Raphael Neider <rneider AT web.de>
548
549         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
550           genConstPointerGet): use safe way of generating MOVFF to cover
551             literals as well as registers, fixes bug #1440527
552         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
553             dereference
554           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
555             more correctly, fixes bug #1232186
556           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
557         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
558             gplink guess the correct processor in more cases, applied patch
559             from Till Riedel attached to and fixing bug #1436552
560
561 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
562
563         * support/regression/tests/array.c: added, contains check for #1434401
564         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
565
566 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
567
568         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
569         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
570         * device/include/mcs51/c8051f326.h,
571         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
572         * device/include/mcs51/c8051f000.h,
573         * device/include/mcs51/c8051f018.h,
574         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
575           PCON_IDLE,PCON_STOP and added sfr16 definitions
576
577 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
578
579         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
580           genGetWord): fixed bug 1409955
581
582 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
583
584         * device/include/hc08/mc68hc908gp32.h,
585         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
586
587 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
588
589         * src/SDCCast.c (constExprValue): return NULL if not a value
590         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
591         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
592         * support/regression/tests/bitfields.c: enabled signed bitfield for all
593
594 2006-02-13 Borut Razem <borut.razem AT siol.net>
595
596         * src/regression/ptrarg.c: added, fails due to bug #1430967
597         * src/regression/Makefile: ptrarg.c added, ...
598
599 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
600
601         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
602         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
603
604 2006-02-11 Borut Razem <borut.razem AT siol.net>
605
606         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
607           print "Processor: xxx" message to stdout only if --verbose
608
609 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
610
611         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
612         * support/regression/tests/bug1426356.c: added
613         * support/regression/tests/bitfields.c: removed 2 tests
614
615 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
616
617         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
618         * device/include/mcs51/c8051f330.h,
619         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
620           PCON_IDLE,PCON_STOP and added sfr16 definitions
621         * device/lib/_divsint.c,
622         * device/lib/_divuint.c,
623         * device/lib/_divulong.c,
624         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
625           register bank bug for small stackauto
626
627 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
628
629         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
630
631 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
632
633         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
634         * all.dsp: corrected several bin paths
635         * device/include/mcs51/c8051f120.h,
636         * device/include/mcs51/c8051f300.h,
637         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
638           to PCON_IDLE,PCON_STOP
639         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
640         * device/lib/printf_large.c (output_float): fixed bug 1388703
641         * support/regression/tests/bug1057979.c: added test for bug 1388703
642
643 2006-02-08 Raphael Neider <rneider AT web.de>
644
645         * src/pic/pcode.c (pciTRIS): fixed typo,
646           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
647           (LinkFlow): fixed handling of flows that end in a call,
648           (ReuseReg): perform safety check earlier
649         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
650             to work with flows at the beginning of a pBlock,
651             fixes #1426557 (Symbol not previously defined),
652           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
653             usage information
654           (RemoveUnusedRegisters): update register usage info
655         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
656             created, reuse existing ones instead
657         * src/pic/gen.c (genPcall): fixed #1424719
658
659 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
660
661         * link/z80/lkmain.c,
662         * link/z80/lklex.c,
663         * link/z80/lkdata.c,
664         * link/z80/aslink.h: fixed build on current cygwin:
665         replaced getline() by lk_getline()
666
667 2006-02-01 Borut Razem <borut.razem AT siol.net>
668
669         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
670           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
671           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
672           src/regression/bool1.c, src/regression/bool2.c,
673           src/regression/bool3.c, src/regression/call1.c,
674           src/regression/compare.c, src/regression/compare10.c,
675           src/regression/compare2.c, src/regression/compare3.c,
676           src/regression/compare4.c, src/regression/compare5.c,
677           src/regression/compare6.c, src/regression/compare7.c,
678           src/regression/compare8.c, src/regression/compare9.c,
679           src/regression/configword.c, src/regression/for.c,
680           src/regression/inline.c, src/regression/mult1.c,
681           src/regression/nestfor.c, src/regression/or1.c,
682           src/regression/pointer1.c, src/regression/ptrfunc.c,
683           src/regression/rotate1.c, src/regression/rotate2.c,
684           src/regression/rotate3.c, src/regression/rotate4.c,
685           src/regression/rotate5.c, src/regression/rotate6.c,
686           src/regression/rotate7.c, src/regression/string1.c,
687           src/regression/struct1.c, src/regression/sub.c,
688           src/regression/sub2.c, src/regression/switch1.c,
689           src/regression/while.c, src/regression/xor.c,
690           src/regression/create_stc, src/regression/simulate,
691           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
692           regression tests
693         * src/regression/gpsim_assert.h: added
694
695 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
696
697         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
698         ((void (code *) (void)) 0) ();
699         * as/hc08/aslex.c,
700         * as/hc08/aslink.h,
701         * as/hc08/asm.h,
702         * as/hc08/asmain.c,
703         * as/hc08/lkdata.c,
704         * as/hc08/lklex.c,
705         * as/hc08/lkmain.c,
706         * as/mcs51/aslex.c,
707         * as/mcs51/aslink.h,
708         * as/mcs51/asm.h,
709         * as/mcs51/asmain.c,
710         * as/mcs51/lkdata.c,
711         * as/mcs51/lklex.c,
712         * as/mcs51/lkmain.c,
713         * as/z80/aslex.c,
714         * as/z80/asm.h,
715         * as/z80/asmain.c: fixed build on current cygwin:
716         replaced getline() by as_getline()
717
718 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
719
720         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
721         declarator in the symbol chain
722         * src/SDCCsymt.h,
723         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
724         parameter list for function pointers
725         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
726         * support/regression/tests/bug-716242.c: added
727
728 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
729
730         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
731         offset if possible
732         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
733
734 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
735
736         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
737         inifinitely recurseable, added static
738         * support/regression/tests/bug-1408066.c: added
739
740 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
741
742         * src/SDCCicode.h,
743         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
744         renamed, added possibility to create "postLoopLbl"-labels
745         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
746         newiTempLoopHeaderLabel
747         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
748         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
749         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
750         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
751         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
752         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
753         (basicInduction): fixed bug #136564, made static,
754         (loopInduction): changed parameter of basicInduction, made static,
755         (addPostLoopBlock): added
756         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
757         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
758         findLoopEndSeq
759         * support/regression/tests/bug-136564.c: added
760         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
761         --std-sdcc99 to LIBSDCCFLAGS
762
763 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
764
765         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
766         while loop
767         * support/regression/tests/bug-1406131.c: added
768
769 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
770
771         * src/SDCCast.c (decorateType): fix promotion of unary minus
772         * src/SDCCsymt.c (computeType): beautified
773         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
774         (valUnaryPM, valComplement): fix sign and promotion,
775         (valNot): ANSI: result type is int (SDCC: unsigned char)
776         * support/regression/tests/uminus.c: speedup by removing superflous
777         test case 'int'
778         * support/regression/tests/onebyte.c: added promotion and signedness
779         tests for unary minus
780         * support/regressions/tests/bug-477927.c: disable warning about
781         uninitialized variables
782         * support/regression/tests/not.c: added
783
784 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
785
786         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
787         * src/mcs51/gen.c (gen51Code): show final register usage after
788         fillGaps in asm with --i-code-in-asm
789         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
790         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
791         incUsed, rliveClear, adjustIChain): made static,
792         (setFromRange): excluded because it's unused,
793         (findPrevUseSym, markWholeLoop): added,
794         (findPrevUse): rewritten; fixes bug 895992; now a complete search
795         through all branches of predecessors enables sdcc to emit the warning
796         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
797         (rlivePoint): made static, added parameter emitWarnings which is only
798         true during the first run out of two,
799         (findRecursiveSucc, findRecursivePred): removed,
800         (computeLiveRanges): made static, added parameter emitWarnings,
801         (dumpIcRlive): added for debugging only
802         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
803         removed prototype of setFromRange()
804         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
805         in call of computeLiveRanges()
806         * support/regression/tests/bug-895992.c: added
807         * support/regression/tests/bug-971834.c: added
808         * support/valdiag/tests/bug-895992.c: added
809         * support/valdiag/tests/bug-971834.c: added
810
811 2005-12-18 Raphael Neider <rneider AT web.de>
812
813         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
814           (genUnpackBits): improved code for direct operands,
815           (genPackBits): improved code for literal assignment to bitfields
816             and for direct destination operands (no FSR indirection),
817             prevented redundant AND, fixes #1362800,
818           (AccLsh): added parameter to disable masking of the result
819         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
820           skip instructions with side-effects (like incfsz),
821           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
822         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
823         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
824           fixes #1375263
825
826 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
827
828         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
829         volatile variables as spill location
830
831 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
832
833         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
834         replacing literals
835         * support/regression/tests/bug-1376320.c: added
836
837 2005-12-08 Raphael Neider <rneider AT web.de>
838
839         * src/pic/device.c: renamed is_shared to pic14_is_shared
840         * src/pic/gen.c (genIfx): re-enabled handling of sbits
841         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
842           (is_valid_identifier): added for above workaround
843
844 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
845
846         * device/lib/Makefile.in: fixed to enable port-specific-objects
847         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
848           char, thanks Hubert Sack
849         * doc/sdccman.lyx: documented --xstack-loc,
850           elaborated a bit more on interrupts and pitfalls,
851           removed "setjmp/longjmp unsupported",
852           documented some unsupported C99 features
853         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
854         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
855           if, thanks Hubert Sack
856         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
857         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
858           make make_library
859         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
860           regression tests can report resource usage (rfe 700441)
861         * support/regression/collate-results.py: report resource usage
862         * support/regression/ports/ds390/spec.mk,
863         * support/regression/ports/hc08/spec.mk,
864         * support/regression/ports/mcs51/spec.mk,
865         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
866         * support/regression/ports/ds390/uCsim.cmd,
867         * support/regression/ports/hc08/uCsim.cmd,
868         * support/regression/ports/mcs51/uCsim.cmd,
869         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
870         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
871           library, use the default one
872         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
873           building the library
874
875 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
876
877         * config.dsp: added dependency on .version and configure_vc.awk
878         * device/include/setjmp.h: updated for --stack-auto and --xstack
879         * device/include/mcs51/at89c51snd1c.h: corrected line endings
880         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
881         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
882         * device/lib/libsdcc.lib: added _setjmp
883         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
884           (decorateType): fixed bug 1372851,
885           (optimizeGetHbit): fixed warning
886         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
887           array initialisation
888         * support/regression/tests/bug1057979.c: added test for bug 1358192
889         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
890
891 2005-12-03 Borut Razem <borut.razem AT siol.net>
892
893         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
894           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
895
896 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
897
898         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
899         createIval): implement symbol independant "flexible array member",
900         (createIvalCharPtr): implemented flexible array initialisation with a
901         string
902         * src/SDCCsymt.c (copyStruct): removed,
903         (getSize): fixed misleading comment,
904         (getAllocSize): removed, the additional allocation size is now in
905         sym->flexArrayLength,
906         (checkStructFlexArray): new, syntax checks for flexible array members,
907         (compStructSize): added syntax checks for "flexible array members"
908         (copyStruct): removed,
909         (copyLinkChain): removed inefficient fix for bug 770487
910         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
911         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
912         symbol->flexArrayLength
913         * src/SDCCerr.c,
914         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
915         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
916         * support/regression/tests/structflexarray.c: added
917         * support/valdiag/tests/structflexiblearray.c: added
918
919 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
920
921         * src/SDCCast.c (decorateType): fixed bug 1368489
922         * support/Util/SDCCerr.c,
923         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
924
925 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
926
927         * device/include/mcs51/at89c51snd1c.h: added file submitted by
928           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
929
930 2005-11-27 Borut Razem <borut.razem AT siol.net>
931
932         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
933           support/cpp2/mkdeps.h: added command line option
934           -obj-ext=<extension> to SDCPP to define object file externion, used
935           for generation of make dependencies (-M)
936         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
937
938 2005-11-26 Borut Razem <borut.razem AT siol.net>
939
940         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
941           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
942           added pic and pic16 libraries
943
944 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
945
946         * device/include/float.h: Corrected typo in prototype of __fsgt
947
948 2005-11-25 Borut Razem <borut.razem AT siol.net>
949
950         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
951           added creation of model-mcs51-stack-auto libraries
952
953 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
954
955         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
956         and fields-list too
957         * src/SDCCast.c (createIvalArray): removed obsolete comment
958
959 2005-11-24 Borut Razem <borut.razem AT siol.net>
960
961         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
962           added missing device/lib/mcs51/crt*.asm sources
963
964 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
965
966         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
967
968 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
969
970         * device/lib/_fs2schar.c,
971         * device/lib/_fs2sint.c,
972         * device/lib/_fs2slong.c: optimized inline asm
973
974 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
975
976         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
977           Better handling of floats between -1.0 and 0.0.
978
979 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
980
981         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
982           (the missing "if"s prohibited removal of redundant labels)
983
984 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
985
986         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
987           Properly convert floats between -1.0 and 0.0 to long, int, and char
988           types (max integer value of negative floats tends to zero).
989         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
990           Removed changes made so to work properly with floats between
991           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
992           and _fs2char.c
993
994 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
995
996         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
997         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
998         (genCast) cosmetic change
999         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
1000         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
1001         from mcs51
1002         * support/regression/tests/bitfields (testSignedBitfields): added
1003
1004 2005-11-18 Borut Razem <borut.razem AT siol.net>
1005
1006         * sdcc/device/lib/Makefile.in: remove all unnecessary files
1007         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
1008           introduced SILENT option to make building of pic16 libraries less
1009
1010 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1011
1012         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
1013           Now they work properly with floats between -1.0 and 0.0
1014         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
1015
1016 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1017
1018         * src/SDCCicode.c (printOperand): added missing else
1019
1020 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1021
1022         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1023         reformatted for better readability
1024         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1025         signed bitfields
1026
1027 2005-11-17 Borut Razem <borut.razem AT siol.net>
1028
1029         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1030           introduced SILENT option to make building of pic16 libraries less
1031           verbose - used for nightly snapshot build
1032         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1033           available on Win32 platforms.
1034         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1035           medium, large, pic and pic16
1036
1037 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1038
1039         * device/lib/printf_large.c: Temporary patch for bug 1358192:
1040           printf("%f"...) sets fraction to zero.
1041
1042 2005-11-16 Raphael Neider <rneider AT web.de>
1043
1044         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1045           fixes #1357221
1046         * src/pic/gen.c (genIfx): implemented for CARRY bit
1047         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1048           to generic pointers, fixes #1357332,
1049           (pic16_movLit2f): NEW,
1050           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1051
1052 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1053
1054         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1055
1056 2005-11-11 Raphael Neider <rneider AT web.de>
1057
1058         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1059         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1060           compute pointer's type from operand,
1061           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1062           improved single bit reads, fixes bug #1353379
1063
1064 2005-11-09 Borut Razem <borut.razem AT siol.net>
1065
1066         * support/scripts/sdcc.nsi: added lib/pic to the package
1067
1068 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1069
1070         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1071
1072 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1073
1074         * support/regression/tests/bug1348008.c: added
1075         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1076         * support/regression/tests/bug1337835.c: updated comment
1077
1078 2005-11-06 Borut Razem <borut.razem AT siol.net>
1079
1080         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1081           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1082           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1083           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1084           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1085           dynamic construction of cl_error_class and derivates - 2.nd try
1086
1087 2005-11-05 Borut Razem <borut.razem AT siol.net>
1088
1089         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1090           bug, which caused Bus Errors on sparc solaris
1091
1092 2005-11-04 Borut Razem <borut.razem AT siol.net>
1093
1094         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1095           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1096           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1097           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1098           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1099           and derivates to resolve the initialization problem on OSX
1100
1101 2005-11-02 Borut Razem <borut.razem AT siol.net>
1102
1103         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1104           corrected typo - #include <winsock2.h>
1105
1106 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1107
1108         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1109           (_asxxxx_mapping): added org directive for future enhancements
1110
1111 2005-11-01 Borut Razem <borut.razem AT siol.net>
1112
1113         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1114           enabled sockets on WIN32
1115         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1116
1117 2005-10-31 Borut Razem <borut.razem AT siol.net>
1118
1119         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1120           WIN32 backslash path delimiters should be escaped when used in C strings
1121         * support/regression/tests/bitfields.c: exclude failing assertions for
1122           __CYGWIN32__ and __MINGW32__ hosts
1123
1124 2005-10-30 Borut Razem <borut.razem AT siol.net>
1125
1126         * src/SDCCutil.c: corrected double comparison typo
1127
1128 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1129
1130         * device/lib/medium/Makefile: added for new memory model medium
1131         * device/include/asm/mcs51/features.h: updated for medium/pdata
1132         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1133           added Multiply & Accumulate sbit's and MAC0_PAGE define
1134         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1135         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1136         * device/lib/_mullong.c: update for medium model
1137         * device/lib/incl.mk: added medium model
1138         * doc/sdccman.lyx: documented medium model
1139         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1140         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1141         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1142         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1143           (allocParms): set SCLS and OCLS to pdata for medium model
1144         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1145           for pdata,
1146           (powof2): return <0 if not power of 2
1147         * src/avr/gen.c (genBitWise): use updated powof2
1148         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1149           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1150           (shiftLLeftOrResult): use B if necessary
1151         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1152         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1153         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1154         * support/regression/Makefile.in: added test-mcs51-medium
1155         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1156
1157 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1158
1159         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1160         specifier unsigned
1161         * device/lib/time.c (mktime): fixed bug 1334315
1162
1163 2005-10-28 Raphael Neider <rneider AT web.de>
1164
1165         * device/include/pic/p16f_common.inc: added common declarations
1166         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1167
1168 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1169
1170         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1171           (aopPutUsesAcc): added to predict accumulator use,
1172           (assignResultValue): save acc if necessary,
1173           (genMinusDec): store result if indirectly addressed,
1174           (genDivOneByte):  save acc if necessary,
1175           (movLeft2Result): bugfix if left already in acc,
1176           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1177             attention to accumulator use (esp. pdata),
1178           (genReceive): receive pdata correctly
1179         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1180         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1181
1182 2005-10-27 Raphael Neider <rneider AT web.de>
1183
1184         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1185
1186 2005-10-27 Raphael Neider <rneider AT web.de>
1187
1188         * .version: changed version to 2.5.4
1189         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1190         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1191           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1192             arithmetics support routines
1193         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1194         * device/lib/Makefile.in: also create installdir for pic
1195
1196         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1197           pic14 port as well
1198         * src/pic/device.c (dump_sfr): rewritten to delegate register
1199           placement to the linker (use `extern sym' rather than sym EQU addr),
1200           (validAddress): fixed to check last specified address
1201         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1202           (popGetLit): truncate literal value to 8 bit,
1203           (popGet): moved assert to more appropriate place
1204           (popGetExternal): create pCode operand from and mark the according
1205             symbol as being `extern'
1206           (popGetAddr): added sanity check on immediate's offset, provide
1207             GPOINTER tag on demand
1208           (aopPut): fixed for immediates,
1209           (mov2w_op): move operand's address or contents to WREG (depending on
1210             operand type), safer variant of mov2w,
1211           (movwf,call_libraryfunc): NEW, handy abbreviations,
1212           (get_argument_pcop,get_return_val_pcop,pass_argument,
1213           get_returnvalue): interface for accessing function parameters and
1214             return values,
1215           (assignResultValuei,genRet): use new parameter/return value interface
1216           (pic14_getDataSize): back to old version handling generic pointers,
1217           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1218             provided implementation and/or fixed old one,
1219           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1220             calls, removed legacy 8051 reference code
1221           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1222           (loadSignToC): NEW, move the operands sign bit to CARRY,
1223           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1224             genRightShiftSigned, accepts negative shift counts,
1225           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1226           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1227             generic pointers, __data pointers and __code pointers,
1228           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1229             and signed bitfields, limit bitfields to 8 bit,
1230           (genDataPointerGet): fixed number of bytes read,
1231           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1232           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1233             pointers to constant data are no longer assumed to point to __code
1234             space, removed invalid pointer types,
1235           (bitpatternFromVal): retrieve the PICs representation of an integer
1236             or float literal,
1237           (genDataPointerSet): fixed assigning to po_immediate operands,
1238           (genGenPointerSet): implemented as library call,
1239           (genIfx): fixed incorrect condition,
1240           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1241             provide GPOINTER tag according to destination's storage class,
1242           (genCast): added code to handle casting to generic pointers, added
1243             sign-/zero extension of the result
1244           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1245         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1246         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1247           extend the result
1248         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1249           address/register resides in the shared banks
1250           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1251             put all variables into separate sections (have the linker arrange
1252             them)
1253           (picglue): put init code and interrupt handlers in separate sections
1254         * src/pic/main.c: added port specific options table, modified to PORT
1255           structure to make GPOINTERs 3 byte, added pic14_options
1256           (_pic14_do_link): private linking routine (update paths to libraries,
1257             add libsdcc.lib by default)
1258         * src/pic/main.h: declare pic14_options
1259         * src/pic/pcode.c: fixed instructions i/o relations,
1260           (RegCond): reverted to correct version,
1261           (newpCodeOpLit): truncate literals to 8 bit,
1262           (genericPrint): added debug output,
1263           (getRegFromInstruction): fixed for various operand types, simplified
1264           (BuildFlow): fixed broken handling of isntructions with labels
1265           (LinkFlow): start at last instruction in flow (skip trailing comments),
1266             pass the flow on to the next instruction after CALL
1267           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1268           (insertPCodeInstruction): fixed inserting after a skip instruction,
1269           (DoBankSelect): fixed for labeled instructions
1270           (OptimizepBlock): honor --nopeep switch
1271           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1272         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1273         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1274           (pCodeOptime2pCodes): allow disabling this optimization via
1275             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1276             but is still buggy), started implementation of a dataflow based
1277             pCode optimization (CSE + dead code elimination)
1278           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1279         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1280           names are independant of the stack location and therefore portable across
1281           devices
1282
1283 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1284
1285         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1286           (selectSpil): fixed bug 1337835 by not spilling bit variables
1287         * support/regression/tests/bug1337835.c: added test for this bug
1288         * src/mcs51/peeph.def: restart after rule 3.c,
1289           addded rules 263.x to optimize loading constants
1290
1291 2005-10-26 Raphael Neider <rneider AT web.de>
1292
1293         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1294         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1295           (genAssign): emit warning when casting literals to generic pointer
1296             type, also applies when taking the address of a fixed variable,
1297           (genCast): improved casting to generic pointers
1298         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1299           extern variables, added verbose error message
1300         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1301
1302 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1303
1304         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1305         carry must be complemented too
1306         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1307         could be emitted by genMinus
1308         * src/SDCCval.c (constVal): fixed bug 1305065
1309
1310 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1311
1312         * src/SDCCast.c (addCast): added promotion for bit variables
1313         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1314         promotion casts + optimisation
1315         (optimizeGetWord): fix warning 'i' might be used uninitialized
1316         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1317         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1318
1319 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1320
1321         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1322         all chars are promoted to int; promotion should be handled in SDCCast.c
1323
1324 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1325
1326         * device/lib/_strcmp.c: Fixed bug 1326457
1327
1328 2005-10-11 Raphael Neider <rneider AT web.de>
1329
1330         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1331         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1332
1333 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1334
1335         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1336         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1337
1338 2005-10-04 Raphael Neider <rneider AT web.de>
1339
1340         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1341           device/lib/pic16/pics.all: added pic18f1320
1342         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1343
1344 2005-09-30 Raphael Neider <rneider AT web.de>
1345
1346         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1347         * src/pic16/devices.inc: NEW, provides device descriptions
1348         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1349
1350 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1351
1352         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1353           GETHBIT
1354
1355 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1356
1357         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1358           documented Any Order Bit, Higher Order Byte and Higher Order Word
1359         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1360         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1361           (optimizeGetAbit): new, to get any bit, not only the high bit,
1362           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1363           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1364           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1365           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1366             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1367             GETABIT, GETBYTE, GETWORD: decorate them,
1368           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1369           (ast_print): added GETABIT, GETBYTE, GETWORD
1370         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1371         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1372           (geniCodeBinary): new generic binary icode,
1373           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1374         * src/port.h: updated comment for PORT.hasExtBitOp
1375         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1376           (genGetByte): new, to get a single byte,
1377           (genGetWord): new, to get a word from a long,
1378           (gen51Code): added GETABIT, GETBYTE, GETWORD
1379         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1380
1381 2005-09-23 Raphael Neider <rneider AT web.de>
1382
1383         * configure.in, configure: have device/lib/pic configured
1384         * device/lib/Makefile.in: added model-pic14
1385         * device/lib/clean.mk: added pic/ to clean rule
1386         * device/lib/pic: added rudimentary pic14 library providing support
1387           functions for multiplication/division/generic pointer access
1388         * src/SDCCopt.c (convilong): mark support functions as extern
1389           for pic14 port as well
1390         * src/pic/gen.c (genMult): added assertions,
1391           (genpic14Code): emit warning on unhandled iCodes
1392         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1393         * src/pic/pcode.c (pCodeOpCopy),
1394         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1395           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1396           SFR_REGISTER}), made safe for future extensions
1397         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1398           instructions even if preceeded by SKIP instructions (also remove
1399           them); removed unused code
1400         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1401           prevents leaving parts of the structure uninitialized after copying
1402
1403 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1404
1405         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1406           ago by me
1407         * support/regression/tests/addsub.c: added test for the bug
1408
1409 2005-09-21 Raphael Neider <rneider AT web.de>
1410
1411         * device/include/pic16/pic18f1220.h,
1412           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1413         * device/lib/pic16/Makefile.rules: added missing opening paren
1414         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1415           are provided in genutils.c,
1416           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1417           operand/result sizes,
1418           (genCmp): assert on NULL pointers first, then check deref'ed values
1419         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1420           result size
1421
1422 2005-09-18 Raphael Neider <rneider AT web.de>
1423
1424         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1425           as these are now unused,
1426           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1427         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1428           local, avoids uninitialized pointer dereference on r->name
1429         * src/pic16/ralloc.c (newReg): fixed indentation
1430
1431 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1432
1433         * src/SDCCval.c (constVal): fixed bug 730366
1434         * support/Util/SDCCerr.c,
1435         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1436
1437 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1438
1439         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1440
1441 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1442
1443         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1444
1445 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1446
1447         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1448           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1449         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1450           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1451         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1452         * packihx/packihx.c (hexDigit): made c unsigned char
1453         * as/mcs51/lklibr.c (fndsym),
1454         * link/z80/lkgb.c (gb),
1455         * link/z80/lklibr.c (fndsym),
1456         * link/z80/lkrloc.c (relr),
1457         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1458         * src/SDCC.lex (checkCurrFile, process_pragma),
1459         * src/SDCCglue.c (spacesToUnderscores),
1460         * src/SDCCmain.c (setParseWithComma, processFile),
1461         * src/asm.c (tvsprintf, printCLine),
1462         * src/avr/gen.c (emitcode, aopPut),
1463         * src/ds390/gen.c (emitcode),
1464         * src/hc08/gen.c (emitcode, emitinline),
1465         * src/mcs51/gen.c (emitcode, genInline),
1466         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1467           tokenizeLineNode),
1468         * src/pic/ralloc.c (debugLog),
1469         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1470           tokenizeLineNode),
1471         * src/pic16/ralloc.c (debugLog),
1472         * src/z80/main.c (_process_pragma):
1473            made all ctype.h function calls safe
1474         * src/SDCCopt.c: include math.h for fabs
1475         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1476           and used them throughout the code to make ctype.h function calls safe
1477         * src/ds390/main.c (asmLineNodeFromLineNode),
1478         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1479         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1480            unsigned char*
1481         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1482           (newpCodeAsmDir): made ctype.h function calls safe
1483         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1484           pic16_emitcode):  made lbp unsigned char*
1485         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1486           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1487         * src/xa51/gen.c (emitcode),
1488         * src/z80/gen.c (_emit2): made lbp unsigned char*
1489         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1490            char*
1491
1492 2005-09-05 Raphael Neider <rneider AT web.de>
1493
1494         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1495           access bank splitpoint
1496
1497 2005-09-05 Raphael Neider <rneider AT web.de>
1498
1499         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1500
1501 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1502
1503         * .version: changed to version 2.5.3
1504         * doc/sdccman.lyx: changed version to 2.5.3,
1505           documented --codeseg and --constseg and pragma codeseg and constseg,
1506           documented bit parameters (reentrant) and bit returning
1507         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1508            currFunc->recvSize, but is this ok for all ports?
1509           (ast2iCode): result of ~ on unsigned char must be cast to int for
1510            bool to work
1511         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1512           function pointers in bit space
1513         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1514           (processFuncArgs): call port.reg_parm() with reentrancy info
1515         * src/port.h,
1516         * src/avr/main.c,
1517         * src/ds390/main.c,
1518         * src/hc08/main.c,
1519         * src/pic/main.c,
1520         * src/pic16/main.c,
1521         * src/xa51/main.c,
1522         * src/z80/main.c: port.reg_parm prototype extended with
1523           "bool reentrant" parameter
1524         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1525           options.stackAuto for allocating bit register parameters
1526         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1527           (genSend): set BitBankUsed if it is,
1528           (selectRegBank): factored out of genCall for use in genPcall,
1529           (genCall): removed redundant dtype assignmen, use selectRegBank,
1530           (genPcall): handle returning in Carry properly, save in F0 if needed,
1531           (genReceive): handle bit register parameters
1532         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1533           (mcs51_assignRegisters): enable bit registers for all reentrant
1534            functions and don't set BitBankUsed unconditionally
1535         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1536         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1537         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1538
1539 2005-08-27 Borut Razem <borut.razem AT siol.net>
1540
1541         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1542         ppc-osx (Darwin) does not support -u option. It seems that it is
1543         supported only on Linux - GNU cp
1544
1545 2005-08-25 Borut Razem <borut.razem AT siol.net>
1546
1547         * sim/ucsim/gui.src/serio.src/Makefile.in,
1548           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1549           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1550           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1551           install and strip, since the strip at /usr/ccs/bin should be used
1552           on solaris
1553
1554 2005-08-24 Borut Razem <borut.razem AT siol.net>
1555
1556         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1557
1558 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1559
1560         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1561         ffffffffu
1562
1563 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1564
1565         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1566         * as/mcs51/lkmain.c (link_main): fixed warning
1567         * device/include/stdbool.h: ds390 has no advanced bit support yet
1568         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1569         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1570         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1571           and updated their macros
1572         * src/SDCCval.c (constVal): updated comment for renamed b_long
1573
1574 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1575
1576         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1577         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1578           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1579           (oprio): set priority for '['
1580         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1581            and adb_24_bit
1582         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1583         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1584         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1585         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1586           added overlayable BIT_BANK area
1587         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1588           (summary2): explain 'T' in legenda
1589         * as/mcs51/lkrloc.c: replaced old K&R style,
1590           (relr): added R_BIT processing,
1591           (errmsg): added "Bit-addressable relocation error",
1592           (adb_bit): added for converting from byte- to bit-addressable space,
1593           (adb_24_bit): added for converting from byte- to bit-addressable space
1594         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1595            used in reentrant functions now even as return value
1596         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1597         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1598           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1599         * src/SDCCglobl.h: added indicator BitBankUsed
1600         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1601            the bit registers b0-b7
1602         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1603           (geniCodeCast): fixed bug 1263853,
1604           (geniCodeLogicAndOr): put result in bool or char,
1605           (geniCodeReceive): added parameter func for accessing the return type,
1606           (geniCodeFunctionBody): pass func to geniCodeReceive
1607         * src/SDCCmain.c: added indicator BitBankUsed
1608         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1609         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1610           (checkSClass): don't put automatic bool/bit on stack,
1611           (checkFunction): removed check on function cannot return bit
1612         * src/SDCCsymt.h: added newBoolLink prototype
1613         * src/mcs51/gen.c (rb1regs): added bit registers,
1614           (movc): created for assigning to carry,
1615           (pushReg, popReg): created for pushing registers,
1616           (sameRegs): check both AOP_REG and AOP_CRY types,
1617           (aopOp): handle bit registers,
1618           (aopPut): optimization no self-assign,
1619           (saveRegisters): push reg->base (bits) only once for bit registers,
1620            and use pushReg,
1621           (unsaveRegisters): pop reg->base only once and use popReg,
1622           (assignResultValue): added parameter func and return in carry for bits,
1623           (genIpush): optimization no reload in A if not changed,
1624           (genSend): bit parameters in reentrant functions are passed in bit
1625            registers by first assigning to bits in B, then save registers and
1626            copy B to bits,
1627           (genCall): handle returning in Carry properly, save it in F0 if needed,
1628           (genPcall): updated assignResultValue call, this is not safe yet for bit
1629            returning function !!!
1630           (genFunction): don't generate equ's for bit registers and use pushReg,
1631           (genEndFunction): take care of bit returning functions and use popReg,
1632           (genRet): return bit in Carry,
1633           (genIfx): optimize bit registers and other directly addressable bits,
1634           (genReceive): updated assignResultValue call
1635         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1636           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1637            registers when using stack-auto
1638         * src/mcs51/ralloc.c (_G): added allBitregs,
1639           (regs8051): added the bit registers,
1640           (createStackSpil): use macro IS_BIT,
1641           (getRegBit): added to allocate a bit register, else spill,
1642           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1643           (updateRegUsage): factored out to ease stepping while debugging,
1644           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1645            also allocate bit registers,
1646           (fillGaps): handle bit registers,
1647           (findAllBitregs): added to create bit vector with all bit registers,
1648           (mcs51_allBitregs): returns this bit vector,
1649           (mcs51_assignRegisters): when using stack-auto use bit registers for
1650            passing parameters and creating local variables
1651         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1652
1653 2005-08-22 Borut Razem <borut.razem AT siol.net>
1654
1655         * device/lib/Makefile.in: replaced find option -or with -o
1656           to make it run on solaris
1657
1658 2005-08-22 Raphael Neider <rneider AT web.de>
1659
1660         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1661           fixes #1265442 (crash on Solaris)
1662
1663 2005-08-20 Borut Razem <borut.razem AT siol.net>
1664
1665         * configure, configure.in: added tests for libsocket and libnsl libraries,
1666           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1667           from support/regression/Makefile.in
1668         * support/regression/Makefile.in: added
1669         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1670         * sim/ucsim/libtool: regenerated on sparc-solaris
1671         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1672           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1673           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1674           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1675           sparc-solaris, which doesn't use GNU ld linker
1676         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1677         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1678
1679 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1680
1681         * src/mcs51/peeph.def: updated comments
1682
1683 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1684
1685         * device/lib/_gptrget.c,
1686         * device/lib/_gptrput.c: slightly shorter
1687         * doc/sdccman.lyx: incremented version
1688         * src/mcs51/peeph.def: moved peephole comments to the line of first
1689           change to better keep line correlation, reanimated 186.e
1690         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1691
1692 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1693
1694         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1695           David Saxton with quotes around file name.
1696
1697 2005-08-15 Borut Razem <borut.razem AT siol.net>
1698
1699         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1700           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1701           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1702           make tests run on x86_64 platform
1703
1704 2005-08-13 Raphael Neider <rneider AT web.de>
1705
1706         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1707           as it might be executed DURING a build (parallel make is wonderful)
1708
1709 2005-08-13 Raphael Neider <rneider AT web.de>
1710
1711         * device/lib/Makefile.in (port-specific-objects-pic16):
1712           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1713         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1714           dependency
1715         * device/lib/pic16/Makefile.rules: build subdirs before creating
1716           the library, removed builddir rule, create $(builddir) early in
1717           recurse rule, use empty recurse rule for leaf directories
1718         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1719           mkdir errors (race condition), removed duplicate suffix "hex"
1720           from clean rules
1721         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1722         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1723           prevents mkdir -p from aborting on Alpha
1724
1725 2005-08-12 Raphael Neider <rneider AT web.de>
1726
1727         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1728           db-statements in order to allow for arrays of pointers in code
1729           sections to be placed without interspersed 0-padding, fixes
1730           bug #1256215
1731         * (emitStatistics): fixed division by zero for pic18f1220
1732         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1733           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1734         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1735         * (pic16_pCodeConstString): keep track of already emitted string
1736           literals to prevent "duplicate definitions of symbol _str_NR"
1737         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1738           debug message
1739         * device/lib/Makefile.in: ignore failing PIC16 library builds
1740         * device/lib/pic16/Makefile: do not build if gputils are missing
1741         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1742
1743 2005-08-10 Raphael Neider <rneider AT web.de>
1744
1745         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1746           my last commit)
1747
1748 2005-08-10 Raphael Neider <rneider AT web.de>
1749
1750         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1751           Rokas' patch to add the new fixed point type "__fixed16x16"
1752         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1753           functions for __fixed16x16 arithmetics
1754         * device/lib/pic16: reimplemented the build system to support
1755           a separate build directory, better handling of libio (create
1756           the library in a separate subdir for each architecture) and
1757           easier configuration (centralized in Makefile.common)
1758
1759 2005-08-07 Raphael Neider <rneider AT web.de>
1760
1761         * src/pic16/gen.c (genrshTwo): fixed sign extension
1762         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1763         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1764           added T0CONbits
1765         * device/include/pic16/pic18f4220.h: NEW, header for
1766           pic18f4220 and pic18f4320
1767         * device/include/pic16/pic18fregs.h: added new devices,
1768           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1769         * device/include/pic16/signal.h: resolved name clashes
1770           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1771           to also allow testing for interrupt enable bits, added
1772           comments on how to use the macros
1773         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1774         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1775           register definitions for the devices
1776         * device/lib/pic16/pics.all: added new devices
1777         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1778           allocated memory
1779         * device/lib/pic16/libc/stdlib/memfree: do not count
1780           the block header as free memory
1781         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1782           simplified and added missing end-of-blocklist-marker
1783           (reported by Peter Onion, fixes #1252814)
1784         * (_mergeHeapBlock): fixed loop condition
1785         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1786           len==0, restructured code
1787         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1788           up a bit, reduced bitfield accesses, prevent endless loops
1789           in case of heap corruption
1790         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1791           "unreferenced arguments/must return a value" warnings
1792         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1793           replaced BAUDREG with SPBRG
1794         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1795           device/lib/pic16/debug/gstack/gstack.c: replaced
1796           _naked, _asm, _endasm with __naked, __asm, __endasm
1797
1798 2005-08-05 Raphael Neider <rneider AT web.de>
1799
1800         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1801           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1802
1803 2005-08-05 Borut Razem <borut.razem AT siol.net>
1804
1805         * device/lib/Makefile.in: added missing ';'
1806         * configure: removed ^M characters
1807
1808 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1809
1810         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1811           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1812           License
1813
1814 2005-08-04 Borut Razem <borut.razem AT siol.net>
1815
1816         * configure.in: pic16 libraries build 2nd try - enable running
1817           configure in device/lib/pic16
1818         * configure: regenerated from configure.in
1819         * device/lib/Makefile.in: create $(PORT)/bin directory
1820
1821 2005-08-03 Raphael Neider <rneider AT web.de>
1822
1823         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1824           to get/set values via pointers
1825         * (genUnpackBits,genPackBits): changed detection of
1826           ptr->bitfield vs. sym.bitfield, fixed access via generic
1827           pointers, removed dead (wrong) code for multibyte bitfields
1828         * (genNearPointerGet, genGenPointerGet): removed useless code,
1829           fixed bitfield detection, fixes #1250594
1830         * (genNearPointerSet): removed useless code
1831         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1832           and introduced macro pic16_emitpcode that conditionally emits
1833           the origin of the following pCode (useful for debugging SDCC)
1834         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1835         * (createDefmap): fixed handling of LFSR for --optimize-df
1836
1837 2005-08-02 Borut Razem <borut.razem AT siol.net>
1838
1839         * device/lib/Makefile.in: pic16 libraries build enabled since
1840           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1841
1842 2005-08-02 Raphael Neider <rneider AT web.de>
1843
1844         * src/pic16/gen.c (genPackBits): removed deprecated warning
1845         * (genGenPointerSet): fixed bitfield detection
1846
1847 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1848
1849         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1850
1851 2005-07-31 Raphael Neider <rneider AT web.de>
1852
1853         * device/lib/pic16/libdev/pic18f458.c,
1854           device/include/pic16/pic18f458.h: added missing T0CONbits
1855
1856 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1857
1858         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1859
1860 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1861
1862         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1863
1864 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1865
1866         * device/include/mcs51/at89c51ed2.h: added.
1867
1868 2005-07-23 Raphael Neider <rneider AT web.de>
1869
1870         * src/pic/gen.h: added emitpcode macro for debugging
1871         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1872           and replace by macro adding debug information on demand
1873         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1874         * (gencjne): tried to fix; replaced with correct (slower) code
1875         * (gen{Unp,P}ackBits): fixed single bit access
1876         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1877         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1878           previous instruction
1879         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1880           register has to be handled with care (forbidding movement
1881           of assignments/uses, removing assignments completely, ...)
1882         * (pCodeOptime2pCodes): make use of regIsSpecial
1883         * added lots of debugging output (commented out)
1884         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1885           from being reused as result UNLESS it is known to work
1886
1887 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1888
1889         * support/Util/dbuf.h: include <stddef.h> for size_t
1890         * .version: changed to version 2.5.2
1891
1892 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1893
1894         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1895
1896 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1897
1898         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1899           (genModOneByte): removed needless psha/pula
1900
1901 2005-07-22 Raphael Neider <rneider AT web.de>
1902
1903         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1904           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1905         * src/pic/gen.c (resolveIfx): do not "invent" labels
1906         * (genSkipc): changed to positive logic
1907         * (genSkipCond): removed as no longer needed
1908         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1909           backport from PIC16
1910         * (genLeftShift): check operands are in different registers
1911         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1912           INCF does not update CARRY...
1913         * src/pic/main.c: fixed _linkCmd
1914         * src/pic/pcode.c (unlinkpCode): added inactive code
1915         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1916           alive (do not assign result and operand overlapping registers)
1917
1918 2005-07-22 Raphael Neider <rneider AT web.de>
1919
1920         * src/pic/device.c (dump_sfr): replaced register declaration with
1921           call to emitSymbolToFile() to avoid duplicate symbols
1922         * (assignRelocatableRegisters): do not declare external symbols
1923         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1924           right (take size of type, not etype)
1925         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1926         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1927         * (packRegsForAccUse): disabled assignment of WREG as
1928           the result reg to prevent occurence of just fixed #1235003,
1929           fixes #1242954
1930         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1931           symbols (avoids duplicate symbols in .asm file)
1932         * (pic14emitRegularMap): use emitSymbolToFile()
1933         * src/pic/gen.c (aopOp): fixed spillLocation handling
1934         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1935         * (genDataPointerSet): removed unneccessary variables/output
1936
1937 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1938
1939         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1940         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1941
1942 2005-07-21 Raphael Neider <rneider AT web.de>
1943
1944         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1945           architecture cannot handle them efficiently, fixes bug #1235003
1946         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1947           check for empty sets before using them (fixes bug #1232190)
1948
1949 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1950
1951         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1952           (lnksect2): generate warnings for memory overlap
1953         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1954           constseg to set the name of these segments so you can instruct the linker
1955           to place them in banks
1956         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1957         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1958           added code_seg and const_seg to options
1959         * src/SDCCglue.c (emitMaps): use options.const_seg,
1960           (createInterruptVect): put interrupt vectors in segment HOME,
1961           (glue): put HOME before static segment and put the main glue in HOME,
1962           (glue): use options.code_seg
1963         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1964         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1965           these segments so you can instruct the linker to place them in banks
1966           (linkEdit): use code_loc for HOME segment which should be the first
1967           segment in code memory now
1968         * src/SDCCmem.c: fixed more stuff like bug 1238386
1969         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1970           (changePointer): don't change function pointers to code pointers for
1971           banked functions,
1972           (compareType): added exceptional check for banked function pointers
1973         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1974         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1975           after static in code memory
1976         * src/mcs51/gen.c: added aopLiteralLong prototype,
1977           (aopForSym): use getSize for functions,
1978           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1979           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1980           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1981           the segment,
1982           (genPcall): use call for literal function pointers and generate banked
1983           calls over the one trampoline so there's only one place for the user to
1984           modify according to his/hers hardware,
1985           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1986           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1987         * src/mcs51/main.c: added keyword banked,
1988           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1989         * support/Util/SDCCerr.c,
1990         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1991           needed for passing the bank and address to the trampoline
1992         * device/lib/mcs51/crtbank.asm: added for bankswitching
1993         * device/lib/mcs51/Makefile: added crtbank
1994
1995 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1996
1997         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1998           for fields at offset 0 of a struct or union as reported
1999           on 2005-07-07 in the developer mailing list.
2000
2001 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
2002
2003         * src/SDCCmem.c: fixed bug 1238386
2004
2005 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2006
2007         * src/mcs51/peeph.def: added labelrefcounting for peepholes
2008           (patch #1144962), added peephole 300, enabled 259.x
2009         * doc/sdccman.lyx: removed screenshot and provided link instead
2010
2011 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2012
2013         * doc/sdccman.lyx: added section about debugging with ddd
2014         * doc/figures/ddd_example.eps: screenshot of debugging session
2015
2016 2005-07-04 Raphael Neider <rneider AT web.de>
2017
2018         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2019           like CODE pointers, fixes #1115683
2020         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2021           call, fixes bugs #1232211, #1228110,
2022           fixed wrong casts to pCodeFlow from pCodeInstructions
2023
2024 2005-07-04 Raphael Neider <rneider AT web.de>
2025
2026         * src/pic/gen.c (popGet): changed assert to allow for
2027           bit operands
2028         * (popGetAddr): changed signature to provide
2029           an additional index, patched all call sites
2030         * (genCmpEq): handle literal-like operands correctly
2031         * (genAddrOf): added sanity checks on __code/__data pointers
2032         * (genAssign): added handling of symbols from __code section
2033         * (gencjne): do not generate code for comparisons whose result
2034           is neither stored nor used, fixes bug #1171114
2035         * (AccLsh, AccRsh): operate on operand instead of WREG
2036         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2037           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2038           by known count
2039         * rewrote complete shift-by-literal logic, commented unused
2040           functions out
2041         * (genConstPointerGet): get multiple bytes (if result size > 1),
2042           fixed handling of non-immediate addresses
2043         * (genPointerGet): handle CODE pointers like CONST pointers
2044         * (genpic14Code): insert C-SRC lines as Cource-pCodes
2045         * ({aop,op}_isLitLike): NEW, single place to decide whether an
2046           operand is to be treated as a literal or not
2047         * (mov2w,genPcall,genCmpEq),
2048           src/pic/genarith.c: use aop_isLitLike() to decide between
2049           literal/register contents
2050         * (addSign): added missing offset
2051         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2052           only emit comment in debug-mode,
2053           use {aop,op}_isLitLike throughout the file
2054         * src/pic/glue.c: fix initializers for pointers (work in progress)
2055         * src/pic/pcode.c (get_op): honor index on _const symbols
2056         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2057         * (dumppBlock): added pCode size estimation
2058         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2059           check for IS_SYMOP before OP_SYMBOL'ing
2060         * fixed indentation, compacted switch-statements
2061         * (allocReg): find free register and allocate it instead of
2062           allocating new registers all the time
2063         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2064           registers as its operands (necessary only for multibyte GETs)
2065
2066 2005-07-01 Raphael Neider <rneider AT web.de>
2067
2068         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2069           debugging .asm-output macros FENTRY + FEXIT
2070         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2071           way... I wonder...
2072         * (emitpComment): NEW, printf to pCode
2073         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2074           offset handling
2075         * (popGetAddr): NEW, variant of popGet to access an immediates
2076           high(er) bytes instead of the n'th byte of memory they reference,
2077           replaced popGet with popGetAddr where neccessary
2078         * (genDataPointerGet): reactivated and fixed implementation
2079         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2080           accesses
2081         * (genDataPointerSet): fixed multibyte assignments
2082         * (genpic14Code): fixed --i-code-in-asm handling
2083         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2084         * (genPlus): fixed index-out-of-bounds error
2085         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2086         * src/pic/ralloc.c: added debugging output macro FENTRY2
2087         * (spillThis): fixed indentation, enbraced for-body for clarity
2088         * (rematStr): commented out as now unused
2089         * (regTypeNum): commented out special spill case (overwrites
2090           arbitrary values)
2091         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2092
2093 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2094
2095         * doc/sdccman.lyx: documented sfr16/sfr32,
2096           added example for using storage class with function pointers
2097         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2098
2099 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2100
2101         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2102         * device/lib/_itoa.c,
2103         * device/lib/_ltoa.c: optimized codesize
2104         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2105           but don't know how to suppress the double warning.
2106         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2107         * support/Util/SDCCerr.c,
2108         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2109
2110 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2111
2112         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2113           fixed old K&R prototypes
2114         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2115         * device/lib/_gptrget.c,
2116         * device/lib/_gptrgetc.c,
2117         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2118           also new versions for small generic pointers and banked generic pointers
2119         * src/port.h: added const_name
2120         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2121         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2122         * src/SDCCcse.c (findPrevIc): check all associative operators
2123         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2124         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2125         * src/SDCCmem.c: updated comments,
2126           set far-space to 0 for pdata, results in optimized code
2127         * src/SDCCmem.h: added macro CONST_NAME
2128         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2129           moving the info into the highest bits, see also gptrget/gptrput
2130         * src/src.dsp: added sdcc.ico to project files
2131         * src/avr/gen.c (genCast): fixed bug 0x%d
2132         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2133         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2134           relation between ptr_type and DCL_TYPE,
2135           (genCast): fixed bug 0x%d
2136         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2137           (CODE)" for const_name
2138         * src/hc08/gen.c (genCast): fixed bug 0x%d
2139         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2140           (hc08_port): added "CONST (CODE)" for const_name
2141         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2142           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2143           between ptr_type and DCL_TYPE,
2144           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2145           operand* and took AOP() inside function so sfr-ness can be checked,
2146           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2147           new prototype,
2148           (genFunction, genEndFunction): optimized stack setup,
2149           (genMinus): optimized for literals with ending zeroes (in bytes),
2150           (genCast): fixed bug 0x%d
2151         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2152           (mcs51_port): added "CONST (CODE)" for const_name
2153         * src/mcs51/peeph.def: made rule 226 more generic
2154         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2155         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2156         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2157         * src/z80/main.c (z80_port): added NULL for const_name,
2158           (gbz80_port): added NULL for const_name
2159         * support/regression/tests/bug663539.c,
2160         * support/regression/tests/sfr16.c: new tests
2161
2162 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2163
2164         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2165
2166 2005-06-24 Raphael Neider <rneider AT web.de>
2167
2168         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2169           corrected typos...
2170         * device/include/pic16/signal.h: added USBIF
2171           and SIG_USB
2172
2173 2005-06-24 Raphael Neider <rneider AT web.de>
2174
2175         * device/lib/pic16/libdev/pic18f2455.c,
2176           device/include/pic16/pic18f2455.h: NEW
2177         * device/include/pic16/pic18fregs.h,
2178           device/lib/pic16/pics.all,
2179           src/pic16/device.c: added 18f2455
2180         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2181           device/include/pic16/{pic18f[68][567].h,usart.h}:
2182           replaced MULTIPLE_USARTS define with more relaible
2183           compatibility sfrs (for USART access)
2184
2185 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2186
2187         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2188           and the output asm file line is printed on two lines.
2189
2190 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2191
2192         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2193           BGT, BLE, BHI, and BLS instructions
2194         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2195           genCmpEq): removed
2196         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2197           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2198           fixes bug #1216342
2199         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2200
2201 2005-06-15 Raphael Neider <rneider AT web.de>
2202
2203         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2204         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2205         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2206           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2207           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2208
2209 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2210
2211         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2212           Marcel Telka in bug #1215704
2213
2214 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2215
2216         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2217           located in shared memory bank.
2218
2219 2005-05-31 Raphael Neider <rneider AT web.de>
2220
2221         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2222           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2223           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2224
2225 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2226
2227         * device/lib/_strncpy.c: fixed the fix
2228
2229 2005-05-26 Raphael Neider <rneider AT web.de>
2230
2231         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2232           initializers with \0, bug #1208187
2233         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2234           intializers with \0, bug #1208187
2235
2236 2005-05-26 Raphael Neider <rneider AT web.de>
2237
2238         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2239           initializers with \0, bug #1208187
2240         * src/pic16/main.c (_process_pragma): added sanity checks
2241           for stack position and size, emit warnings when appropriate
2242
2243 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2244
2245         * device/lib/_strncpy.c: fixed not filling with \0
2246
2247 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2248
2249         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2250           createFunction),
2251         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2252           compound_statement),
2253         * src/SDCCsymt.h,
2254         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2255
2256 2005-05-24 Raphael Neider <rneider AT web.de>
2257
2258         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2259
2260 2005-05-24 Raphael Neider <rneider AT web.de>
2261
2262         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2263           TRISE definitions, closes bug #1162453
2264
2265 2005-05-22 Raphael Neider <rneider AT web.de>
2266
2267         * src/pic16/main.c (_process_pragma): check for missing
2268           arguments to pragmas code and udata
2269         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2270           consistency fixes to match other headers (thanks to Jim Paris)
2271         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2272
2273 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2274
2275         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2276
2277 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2278
2279         * support/regression/tests/bug1198642.c: new test
2280         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2281         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2282         * support/scripts/resource.h,
2283         * support/scripts/resource.rc,
2284         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2285         * support/scripts/sdcc.ico: added 32x32 icon
2286
2287 2005-05-18 Raphael Neider <rneider AT web.de>
2288
2289         * device/lib/pic16/libdev/pic18f*.c,
2290         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2291           keywords to "__sfr" and "__at (X)"
2292         * device/include/pic16/pic18fregs.h: added pic18f4520
2293         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2294           #1203088 (MPLAB compatibility)
2295
2296 2005-05-17 Raphael Neider <rneider AT web.de>
2297
2298         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2299         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2300         * device/lib/pic16/pics.all: added new devices
2301         * src/pic16/device.c: added support for pic18f4520
2302
2303 2005-05-16 Raphael Neider <rneider AT web.de>
2304         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2305         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2306         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2307           convenience function for bit access
2308
2309 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2310
2311         * device/lib/printf_large.c: fixed bug 1193299
2312         * support/regression/tests/bug1057979.c: added test %3.3s
2313
2314 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2315
2316         * device/include/mcs51/8051.h,
2317         * device/include/mcs51/8052.h: made parseable with lint
2318         * device/include/mcs51/lint.h: added include file for (sp)lint
2319         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2320         * doc/cdbfileformat.lyx,
2321         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2322
2323 2005-05-14 Raphael Neider <rneider AT web.de>
2324
2325         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2326         * device/lib/pic16/libc/stdlib/itoa.c (new)
2327         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2328         * device/lib/pic16/libio/Makefile: exclude subdir according to
2329           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2330         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2331         * src/pic16/gen.c (genFunction): prevent annoying warning
2332         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2333           nameclashes on BeOS
2334         * support/cpp2/cppmain.c (cpp_output_string): new
2335         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2336           fixes bug 1116802
2337
2338 2005-05-13 Borut Razem <borut.razem AT siol.net>
2339
2340         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2341
2342 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2343
2344         * .version: changed to version 2.5.1; back to bleeding edge development
2345
2346 2005-05-11 Borut Razem <borut.razem AT siol.net>
2347
2348         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2349           generate PDF version 1.3 documents
2350
2351 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2352
2353         * .version: changed to version 2.5.0
2354
2355 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2356
2357         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2358
2359 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2360
2361         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2362         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2363         well as many smaller updates.
2364         * .version: changed to version 2.5.0-pre1
2365
2366 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2367
2368         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2369
2370 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2371
2372         * support/regression/tests/bug1185672.c: added
2373         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2374           bug 1185672
2375         * src/mcs51/gen.c (genCall): added comments, made it look safer
2376         * src/mcs51/gen.c (genEndFunction): simplified
2377
2378 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2379
2380         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2381
2382 2005-04-14 Borut Razem <borut.razem AT siol.net>
2383
2384         * fixed bug 1045046 - SIGSEGV with really simple code?:
2385           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2386           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2387
2388 2005-04-14 Borut Razem <borut.razem AT siol.net>
2389
2390         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2391           src/pic16/device.h: temporarily disabled experimental #inline pragma
2392           for 2.5.0 release
2393
2394 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2395
2396         * device/include/z80/stdio.h,
2397         * device/include/z80/string.h: removed these highly incomplete files so
2398           SDCC can use the default ones in device/include/
2399
2400 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2401
2402         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2403         gcc warning.
2404         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2405         fix sdcpp warnings.
2406
2407 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2408
2409         * device/include/malloc.h: removed redundant __reentrant prototypes
2410         * device/lib/_mullong.c: added working xstack variant in asm (C version
2411           doesn't pass regression tests)
2412         * device/lib/bpx.c: used __data and made bpx char for mcs51
2413         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2414           (createFunction): fixed bug with xstackPtr
2415         * src/SDCCcse.c: corrected comments
2416         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2417           (killDeadCode, eBBlockFromiCode): removed unused code
2418         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2419           corrected comments
2420         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2421           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2422           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2423           (genModOneByte): fixed warning in MSVC
2424         * src/mcs51/main.c (): added comments
2425         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2426
2427 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2428
2429         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2430
2431 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2432
2433         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2434
2435 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2436
2437         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2438         characters arrays of larger size than the declared one.
2439
2440 2005-04-10 Borut Razem <borut.razem AT siol.net>
2441
2442         * src/pic/gen.c (genInline),
2443           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2444           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2445           (findNextInstruction), (findPrevInstruction),
2446           (findInstructionUsingLabel),
2447           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2448         * src/pic/pcode.c (findLabel): added missing '\n'
2449         * src/src.dsp: added SDCCdwarf2.c to the project
2450
2451 2005-04-09 Borut Razem <borut.razem AT siol.net>
2452
2453         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2454
2455 2005-04-08 Raphael Neider <rneider AT web.de>
2456
2457         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2458           into the chain after a given one) and mergeDefmapSymbols (combine
2459           defmap entries for each symbol per pcode)
2460         * (createDefmap): have defmap entries merged in the end
2461         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2462           a symbol before replacing one access type's symbol, merge symbols in
2463           the end (replacement symbol might already have an entry)
2464         * (assignValnums): keep reference to written WREG intact
2465
2466 2005-04-08 Raphael Neider <rneider AT web.de>
2467
2468         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2469           Alpha)
2470
2471 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2472
2473         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2474         bytes
2475
2476 2005-04-07 Raphael Neider <rneider AT web.de>
2477
2478         * device/include/pic16/usart.h: added compatibility defines for
2479           devices with more than one USART
2480         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2481
2482 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2483
2484         * device/lib/Makefile.in: updated for port specific include
2485
2486 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2487
2488         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2489
2490 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2491
2492         * device/include/8051.h,
2493         * device/include/8052.h,
2494         * device/include/at89S8252.h,
2495         * device/include/at89c55.h,
2496         * device/include/at89x051.h,
2497         * device/include/at89x51.h,
2498         * device/include/at89x52.h,
2499         * device/include/mcs51reg.h,
2500         * device/include/reg51.h,
2501         * device/include/reg764.h,
2502         * device/include/regc515c.h,
2503         * device/include/sab80515.h: (re)moved these 12 files
2504         * device/include/mcs51/8051.h,
2505         * device/include/mcs51/8052.h,
2506         * device/include/mcs51/at89S8252.h,
2507         * device/include/mcs51/at89c55.h,
2508         * device/include/mcs51/at89x051.h,
2509         * device/include/mcs51/at89x51.h,
2510         * device/include/mcs51/at89x52.h,
2511         * device/include/mcs51/mcs51reg.h,
2512         * device/include/mcs51/reg51.h,
2513         * device/include/mcs51/reg764.h,
2514         * device/include/mcs51/regc515c.h,
2515         * device/include/mcs51/sab80515.h: and added them here
2516
2517 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2518
2519         * device/include/stdarg.h: changed SDCC specific keywords to double
2520           underlined form.
2521         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2522           mcs51 and ds390.
2523         * device/include/hc08/mc68hc908gp32.h,
2524         * device/include/hc08/mc68hc908jb8.h,
2525         * device/include/hc08/mc68hc908jkjl.h,
2526         * device/include/hc08/mc68hc908qy.h: fixed comments
2527         * device/include/mcs51/README: updated
2528         * device/include/mcs51/c8051f120.h: added PINRSF
2529         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2530         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2531           amidst code. Also inline is not supported.
2532
2533 2005-04-06 Raphael Neider <rneider AT web.de>
2534
2535         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2536         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2537           callers stack/frame pointers
2538
2539 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2540
2541         * device/include/pic16/usart.h: added, missing in previous commit,
2542         * device/include/pic16/adc.h: fixed typo,
2543         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2544         commit,
2545         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2546         <p18fxxx.inc>
2547         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2548         uninitialized because a bug appears with gplink
2549         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2550         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2551         complains for unrecognised option
2552
2553 2005-04-05 Raphael Neider <rneider AT web.de>
2554
2555         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2556           structs as well (using memcpy)
2557         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2558           on ISRs (GOTO has no label)
2559         * src/pic16/device.h: added OF_OPTIMIZE_DF
2560         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2561           new data flow analysis/optimization
2562         * src/pic16/pcode.c: added (prototypes for and implementation of)
2563           dataflow analysis functions, fixed pCodeInstructions' inCond and
2564           outCond values, made RCALL a branch instruction
2565         * (pic16_unlinkpCode): keep C line if possible
2566         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2567           C line moved if possible
2568         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2569         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2570           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2571         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2572           new flow)
2573         * (pic16_getJumptabpCode): NEW, needed in...
2574         * (LinkFlow): fixed handling of jumptables, calls and conditional
2575           branches
2576         * (pic16_InsertCommentAfter): NEW
2577         * (pic16_pCodeReplace): made verbose and flow preserving
2578         * (AnalyzeFlow): added call to data flow analysis
2579         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2580         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2581         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2582
2583 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2584
2585         * src/SDCCast.c (decorateType): fixed bug #1105626
2586
2587 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2588
2589         * device/include/asm/pic16/features.h,
2590         * pic18f*.h headers,
2591         * device/include/pic16/adc.h,
2592         * device/include/pic16/delay.h,
2593         * device/include/pic16/i2c.h,
2594         * device/include/pic16/malloc.h,
2595         * device/include/pic16/stdio.h,
2596         * device/include/pic16/stdlib.h,
2597         * device/include/pic16/string.h,
2598         * device/lib/pic16/libc/stdio/printf_tiny.c,
2599         * device/lib/pic16/libc/stdio/printf_small.c,
2600         * device/lib/pic16/libc/stdio/strmgpsim.c,
2601         * device/lib/pic16/libc/stdio/strmmssp.c,
2602         * device/lib/pic16/libc/stdio/strmusart.c,
2603         * device/lib/pic16/libc/stdio/vfprintf.c,
2604         * device/lib/pic16/libc/stdlib/ltoa.c,
2605         * device/lib/pic16/libc/stdlib/putchar.c,
2606         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2607         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2608         * device/lib/pic16/libc/stdlib/memchrram.c,
2609         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2610         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2611         * device/lib/pic16/libio/adc/adcbusy.c,
2612         * device/lib/pic16/libio/adc/adcread.c,
2613         * device/lib/pic16/libio/adc/adcsetch.c,
2614         * device/lib/pic16/libio/usart/ubaud.c,
2615         * device/lib/pic16/libio/usart/ubusy.c,
2616         * device/lib/pic16/libio/usart/udrdy.c,
2617         * device/lib/pic16/libio/usart/uopen.c,
2618         * device/lib/pic16/libio/usart/uputc.c,
2619         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2620         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2621         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2622         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2623         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2624         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2625         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2626         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2627         specific keywords to double underlined form,
2628         * device/lib/pic16/libc/Makefile.rules,
2629         * device/lib/pic16/libsdcc/Makefile.rules,
2630         * device/lib/pic16/libm/Makefile,
2631         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2632         to compile with C standard set in Makefile.common
2633         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2634         rand.c and crc.c in compilation process,
2635         * device/lib/pic16/libsdcc/int/divuint.c,
2636         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2637         `c' from signed to unsigned,
2638         * device/lib/pic16/startup/crt0.c,
2639         * device/lib/pic16/startup/crt0i.c,
2640         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2641         keywords to double underlined form, bug fixes in _do_cinit function
2642         which prevented the correct initialization of the .idata segment,
2643         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2644         core to enter a infinite loop
2645         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2646
2647 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2648
2649         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2650
2651 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2652
2653         * device/include/Makefile.in: add support for hc08 subdirectory
2654         * device/include/hc08/: new subdirectory
2655         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2656         Lucas Loizaga, thanks!
2657         * device/include/hc08/mc68hc908qy.h,
2658         * device/include/hc08/mc68hc908gp32.h,
2659         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2660         their own directory. Changed internal macro names to use the compiler
2661         reserved namespace. Changed SDCC specific keywords to double
2662         underlined form.
2663         * device/include/math.h,
2664         * device/include/malloc.h,
2665         * device/include/stdarg.h,
2666         * device/include/stdbool.h
2667         * device/include/string.h,
2668         * device/include/tinibios.h,
2669         * device/include/ds400rom.h,
2670         * device/include/8051.h,
2671         * device/include/8052.h,
2672         * device/include/80c51xa.h,
2673         * device/include/at89c55.h,
2674         * device/include/at89S8252.h,
2675         * device/include/at89x51.h,
2676         * device/include/at89x52.h,
2677         * device/include/ds80c390.h,
2678         * device/include/reg764.h,
2679         * device/include/regc515c.h,
2680         * device/include/sab80515.h,
2681         * device/include/mcs51/c8051f000.h,
2682         * device/include/mcs51/c8051f018.h,
2683         * device/include/mcs51/c8051f020.h,
2684         * device/include/mcs51/c8051f040.h,
2685         * device/include/mcs51/c8051f060.h,
2686         * device/include/mcs51/c8051f120.h,
2687         * device/include/mcs51/c8051f300.h,
2688         * device/include/mcs51/c8051f310.h,
2689         * device/include/mcs51/c8051f320.h,
2690         * device/include/mcs51/c8051f330.h,
2691         * device/include/mcs51/c8051f350.h,
2692         * device/include/z180.h: Changed SDCC specific keywords to double
2693         underlined form.
2694
2695 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2696
2697         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2698         18F4455,
2699         * (pic16_assignConfigWordValue): disable testing of configuration
2700         register value with config mask,
2701         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2702         function with port->fun_prefix,
2703         * (genFunction): when generating a naked interrupt function never
2704         create an absolute segment placed in interrupt vector address, place
2705         the actual interrupt function at IVA instead, when an interrupt
2706         function is generated with unspecified interrupt then do not create
2707         the absolute section,
2708         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2709         code for generating a call to generic pointer get/put function with
2710         a call to function pic16_callGenericPointer(),
2711         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2712         the call to the generic pointer get/put functions with prefixing the
2713         function name with port->fun_prefix,
2714         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2715         * src/pic16/main.c (_process_pragma): prefix function with
2716         port->fun_prefix,
2717         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2718         calling assembler, old 18Fxxxx macro is deprecated,
2719         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2720         PC_ASMDIR in while condition,
2721         * (findInstruction): add PC_ASMDIR in while condition,
2722         * (buildCallTree): prefix main with port->fun_prefix,
2723         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2724         identifier for variable with banked access in instructions BTFSS,
2725         BTFSC, BCF, BSF, BTG
2726         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2727         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2728         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2729         perform optimization when enviroment variable NO_REG_OPT is set,
2730         * (insideLRBlock): NEW, return 1 if register is inside an
2731         INF_LOCALREGS block,
2732         * (RemoveRegFromLRBlock): remove a register that is completely
2733         eliminated by register optimization, but it is still left in local
2734         register store/restore in/from stack block,
2735         * (Remove2pcodes): after removing register, check to see if it
2736         should be removed from local register store/restore in/from stack
2737         block,
2738         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2739         DUMMY_READ_VOLATILE,
2740
2741         * device/include/pic16/adc.h: minor prototype modifications and
2742         update,
2743         * device/include/pic16/malloc.h: added GPL notice various
2744         modifications,
2745         * device/include/pic16/stdint.h: NEW, standard header for ints
2746         * device/include/pic16/delay.h: NEW, header for delay functions,
2747         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2748         delay1mtcy,
2749         * device/include/pic16/signal.h: NEW, header providing helper macros
2750         for implementing signal handlers,
2751         * device/include/pic16/stdio.h: added prototypes for functions,
2752         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2753         prototypes for stdin and stdout, added macro PUTCHAR to
2754         automatically implement putchar function prototype,
2755         * device/include/pic16/usart.h: modified and updated USART library,
2756         * device/lib/pic16/libio/adc/,
2757         * device/lib/pic16/libio/i2c: some modifications to improve library
2758         performance,
2759         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2760         family of functions,
2761         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2762         family of functions and other sources,
2763         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2764         of the PIC18Fxx[28] devices,
2765         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2766         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2767         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2768         _do_cinit function, because the previous failed when local variables
2769         where not placed in the same memory bank,
2770         * device/lib/pic16/libsdcc/char/: various modifications to improve
2771         library performance,
2772         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2773         information on the new functions of the c library and more...
2774
2775 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2776
2777         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2778
2779 2005-03-26 Raphael Neider <rneider AT web.de>
2780
2781         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2782           if condition == CARRY)
2783         * (genCmp): adapted to new genSkipc semantics
2784         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2785           on rIfx (genCmp was broken)
2786
2787 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2788
2789         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2790         * src/z80/main.c (_keywords[]),
2791         * src/SDCCglobal.h (struct options),
2792         * src/SDCC.y,
2793         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2794         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2795         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2796         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2797         always available in leading double underscore form. The C99 support is
2798         mostly missing, but it's a start.
2799         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2800         reserved identifier "__data".
2801
2802 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2803
2804         * src/mcs51/peeph.def: fixed bug 1170013
2805
2806 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2807
2808         * device/include/mcs51reg.h: fixed bug 842007
2809
2810 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2811
2812         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2813         last time.
2814
2815 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2816
2817         * src/port.h (struct PORT),
2818         * src/avr/ralloc.c (avr_assignRegisters),
2819         * src/avr/main.c,
2820         * src/ds390/ralloc.c (ds390_assignRegisters),
2821         * src/ds390/main.c,
2822         * src/hc08/ralloc.c (hc08_assignRegisters),
2823         * src/hc08/main.c,
2824         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2825         * src/mcs51/main.c,
2826         * src/pic/ralloc.c (pic14_assignRegisters),
2827         * src/pic/main.c,
2828         * src/pic16/ralloc.c (pic16_assignRegisters),
2829         * src/pic16/main.c,
2830         * src/xa51/ralloc.c (xa51_assignRegisters),
2831         * src/xa51/main.c,
2832         * src/z80/ralloc.c (z80_assignRegisters),
2833         * src/z80/ralloc.h,
2834         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2835         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2836         * src/SDCCcse.h,
2837         * src/SDCCdflow.c (computeDataFlow),
2838         * src/SDCCdflow.h,
2839         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2840         * src/SDCCloop.h,
2841         * src/SDCCcflow.c (*),
2842         * src/SDCCcflow.h,
2843         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2844         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2845         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2846         immedDom() returning wrong block; probably fixes bug #1160833)
2847
2848 2005-03-20 Borut Razem <borut.razem AT siol.net>
2849
2850         * support/scripts/inc2h.pl: WIN32 port
2851
2852 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2853
2854         * device/lib/makefile.in: added abs.c and labs.c
2855
2856 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2857
2858         * device/include/stdint.h: added
2859         * device/lib/abs.c: added
2860         * device/lib/labs.c: added
2861         * device/include/stdlib.h: added abs() and labs() prototypes
2862         * device/lib/libsdcc.lib: added abs and labs
2863         * device/include/float.h,
2864         * device/lib/_fsmul.c,
2865         * device/lib/printf_fast.c,
2866         * device/lib/printf_tiny.c: updated comments
2867
2868 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2869
2870         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2871         bug #1164313
2872
2873 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2874
2875         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2876         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2877
2878 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2879
2880         * device/lib/printf_large.c: removed inline assembly for portability and
2881           readability. Use printf_fast if speed or size are more important.
2882         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2883         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2884
2885 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2886
2887         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2888         prevent compiler warning
2889
2890 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2891
2892         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2893         moved to level 0 and declared as static. Also they are explicit
2894         placed in access bank. This was necessery because some times they
2895         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2896         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2897         optimizations. Currently only compare to unsigned char is implemented,
2898         * src/pic16/gen.c: added fReturnIdx array,
2899         * (struct resolvedIfx) is moved to gen.h and made public,
2900         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2901         * (aopForSym): added an optimization to directly store in stack of
2902         the operand of a SEND iCode,
2903         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2904         but as registers instead (AOP_REG) using the fReturnIdx array,
2905         * (pic16_freeAsmop): remove the freed register from the
2906         _G.sregsAlloc field,
2907         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2908         a compare of 'WREG',
2909         * (pic16_popGetTempRegCond): changed function prototype, now
2910         function takes also a bitVector argument v which holds the current
2911         set of registers that are allocated for stack access by aopForSym,
2912         registers allocated in aopForSym for accessing stack symbols are not
2913         any more part of the functions usedRegs field,
2914         * (genCall): some times aopOp is called for a stack variable to be
2915         send, aopForSym might perform the push, if this is true make sure
2916         that genCall doesn't push the variable twice by testing _G.resDirect,
2917         * (genFunction): changed testing for unspecified interrupt number
2918         from 256 to INTNO_UNSPEC,
2919         * modified selection scheme of frame pointer generation. Previously
2920         if function did use local registers a frame pointer was generated,
2921         now a frame pointer is generated only if function has arguments
2922         (that need PLUSW2 register access), or has stack arguments, or the
2923         compiler is not instructed to omit the frame pointer,
2924         * (genEndFunction): before restoring local registers that were saved
2925         in the function preamble, also restore the registers that *might*
2926         have been allocated for stack access,
2927         * (genRet): removed some old comments,
2928         * (genCmp, the active (RN's) version): added a call to the
2929         pic16_genCmp_special function to perform the compare with a more
2930         robust and optimized way,
2931         * (genInline): a feature has been added in inline code generation,
2932         which allows a wildcard variable substitution when writing inline
2933         assembly. Code is incomplete and experimental therefore undocumented,
2934         * (genCast): changed order of aopOp for result and right to allow
2935         aopForSym to directly load the result if possible,
2936         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2937         perform an optimized compare on some selected special occasions,
2938         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2939         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2940         generate an IVT any more,
2941         * src/pic16/main.c (pic16_optionsTable): added command line option
2942         --optimize-cmp,
2943         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2944         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2945         macros,
2946         * src/pic16/NOTES: Raphael Neider added in list of active developers
2947         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2948         jumptable_end to prevent bug #,
2949         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2950         inCond and outCond fields,
2951         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2952         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2953         turn off register spilling,
2954         * (packRegsForOneUse): synced with other ports' versions although it
2955         is not used currently,
2956         * (pic16_packRegisters): added an optimization while reading
2957         structure bitfields, some registers may be saved (malloc code is
2958         decreased by 80 bytes)
2959
2960 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2961
2962         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2963         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2964         this can be optimized more?
2965
2966 2005-03-10 Raphael Neider <rneider AT web.de>
2967
2968         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2969           genNearPointerGet): (hopefully) fixed access to bitfields via
2970           pointers (p->bitN = x; and x = p->bitN; failed)
2971
2972 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2973
2974         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2975
2976 2005-03-09 Raphael Neider <rneider AT web.de>
2977
2978         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2979
2980 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2981
2982         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2983         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2984           (regTypeNum): set REG_BIT type if necessary
2985         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2986         * support/regression/tests/critical.c: check bug 1144613
2987
2988 2005-03-02 Raphael Neider <rneider AT web.de>
2989
2990         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2991
2992 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2993
2994         * src/avr/ralloc.c (serialRegAssign),
2995         * src/ds390/ralloc.c (serialRegAssign),
2996         * src/hc08/ralloc.c (serialRegAssign),
2997         * src/mcs51/ralloc.c (serialRegAssign),
2998         * src/pic/ralloc.c (serialRegAssign),
2999         * src/pic16/ralloc.c (serialRegAssign),
3000         * src/xa51/ralloc.c (serialRegAssign),
3001         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
3002
3003 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
3004
3005         * src/SDCCast.c (decorateType): fixed bug 1124787
3006
3007 2005-02-20 Hubert Sack <sack AT digiplan.de>
3008         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3009
3010         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
3011         patch #1121755
3012
3013 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3014
3015         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
3016         to keep the correct label reference count when adding/removing references
3017         to labels. A peephole file using this is appended to patch #1144962.
3018
3019 2005-02-14 Raphael Neider <rneider AT web.de>
3020
3021         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3022         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3023         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3024           retrievals of result operand's value on assignment
3025
3026 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3027
3028         * device/include/pic16/string.h: modified prototype for memccpy()
3029         to memccpy(void *, void *, char, size_t)
3030         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3031         check whether to omit frame pointer or not,
3032         * (genInline): convert all occurences of "\n" to LF in inline
3033         assembler blocks, this helps formatting the inline text,
3034         * (pic16_loadFSR0): modified prototype,
3035         * (genNearPointerGet, genNearPointerSet): reorganization of code,
3036         removed some 8051 legacy code,
3037         * (genPackBits): enabled handling bitfields exceeding one byte in size,
3038         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3039         before allocating temporary registers in functions,
3040
3041 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3042
3043         * support/regression/tests/bitvars.c: corrected the "fix"
3044
3045 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3046
3047         * support/regression/tests/bitvars.c,
3048         * support/regression/tests/bitwise.c,
3049         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3050
3051 2005-02-10 Raphael Neider <rneider AT web.de>
3052
3053         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3054           different size for Alpha
3055         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3056
3057 2005-02-09 Raphael Neider <rneider AT web.de>
3058
3059         * src/SDCC.lex(doPragma) : save and restore warning options as well
3060           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3061         * have #pragma less_pedantic set the errorlevel to WARNING
3062           (fixes #1117001)
3063         * (cloneOptimize) : fixed wrong malloc's size
3064         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3065           facilitate correct handling of #pragma (save|restore)
3066
3067 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3068
3069         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3070
3071 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3072
3073         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3074
3075 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3076
3077         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3078
3079 2005-02-02 Raphael Neider <rneider AT web.de>
3080
3081         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3082         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3083         * (pic16_storeForReturn): fixed to allow returning function pointers
3084         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3085         * device/include/pic16/{stddef.h,stdbool.h}: added
3086
3087 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3088
3089         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3090
3091 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3092
3093         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3094         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3095          appeared to be required
3096
3097 2005-01-31 Borut Razem <borut.razem AT siol.net>
3098
3099         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3100           include/mcs51 and include/z80 directories to the package
3101
3102 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3103
3104         * src/hc08/gen.c (genFunction): fixed bug #1112752
3105
3106 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3107
3108         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3109
3110 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3111
3112         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3113
3114 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3115
3116         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3117
3118 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3119
3120         * device/include/c8051fxxx.h: removed these 6 files
3121         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3122
3123 2005-01-26 Raphael Neider <rneider AT web.de>
3124
3125         * src/pic16/gen.c (genAssign): fixed assignment from longs
3126           in codespace (were cut to three bytes)
3127         * (genDummyRead): implemented (except for CODESPACE...),
3128           fixed bug #1108575
3129         * src/pic16/glue.c (emitStatistics): beautified
3130         * device/lib/pic16/libm/Makefile: added include path
3131
3132 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3133
3134         * src/z80/gen.c (aopPut): fixed bug #1103902
3135
3136 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3137
3138         * device/lib/expf.c: fixed bug #1095792
3139
3140 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3141
3142         * device/lib/pic16/libm: added Math library sources
3143
3144 2005-01-24 Raphael Neider <rneider AT web.de>
3145
3146         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3147           to enable upcast to pCodeOpReg2 (there is no type tag to
3148           differenciate the two and pic16_popGet2p cast into PCOR2)
3149         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3150           (sizeof(sectNames) changed to sizeof(sectName))
3151           Both patches fix segfaults under MinGW.
3152
3153 2005-01-23 Raphael Neider <rneider AT web.de>
3154
3155         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3156           Safe_[mc]?alloc()'ed variables
3157         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3158           of (byte sized) temporaries (assign them to WREG for now)
3159         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3160           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3161           this might fix SIGSEGVs on MinGW...
3162         * src/SDCCopt.c (killDeadCode): restored original behaviour
3163           (volatile operands might get thrown away though)
3164
3165 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3166
3167         * src/pic16/gen.c: fixed bug #1106975,
3168         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3169         pointer update, INTCON is saved, global interrupts are disabled and
3170         restored after updateing TOS.
3171         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3172         * added function attribute 'shadowregs' to take advantage of shadow
3173         registers,
3174         * added function attribute 'wparam' as an alternative to the wparam
3175         pragma,
3176         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3177         user declares a non-ISR function as 'shadowregs',
3178         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3179
3180 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3181
3182         * .version: bumped version number to 2.4.8
3183         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3184         pic16 port,
3185         * device/lib/pic16/libio/i2c/: I2C module support library,
3186         * device/include/pic16/i2c.h: I2C support library header,
3187         * device/lib/pic16/libc/stdio/: standard IO support sources,
3188         * (printf_small.c): printf_small() source, supports float print,
3189         * (printf_tiny.c): printf_tiny() source, does not support floats,
3190         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3191         enable global optimizations for entire library source, other
3192         Makefiles in the source tree are also modified to reflect this,
3193         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3194         function,
3195         * doc/sdccman.lyx: updated to reflect new changes,
3196         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3197         sym->onStack if-case,
3198         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3199         sbit, idata, _idata, xdata, _xdata,
3200         * added pragma library, to link an external library, (see doc),
3201         * removed command line options, --pomit-config-words, --pomit-ivt,
3202         --pleave-reset-vector,
3203         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3204         when calling assembler to reflect memory model used, also define
3205         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3206         reflect stack model used,
3207         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3208         on stack return NULL,
3209
3210 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3211
3212         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3213           of the operands is volatile. Fixes #1020220
3214
3215 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3216
3217         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3218         * (OptimizeRegUsage): make sure that there is really no other flow where
3219           the first pCode is used
3220
3221 2005-01-22 Raphael Neider <rneider AT web.de>
3222
3223         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3224           to fix #1106967 (pCode->seq are not set up correctly)
3225
3226 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3227
3228         * src/SDCCglue.c (glue): make sure code area is declared before the
3229         static initialization area.
3230
3231 2005-01-21 Raphael Neider <rneider AT web.de>
3232
3233         * device/lib/Makefile.in: fixed test for pic16 install dir
3234         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3235           optimizations
3236         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3237           added --optimize-goto compiler switch and pragma wparam documentation
3238         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3239         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3240           and PRODH closing bug #1071770 (peephole optimizer)
3241
3242 2005-01-19 Raphael Neider <rneider AT web.de>
3243
3244         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3245           cmdLine buffers (used when calling sdcpp...) are large enough
3246           (MAX_PATH=256 truncates arguments leading to system halts when
3247           used in MinGW...)
3248         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3249         * (genUminus): rewritten to for efficiency
3250         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3251           used uninitialized in some cases)
3252         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3253           copy the third byte from the int -- now assumes 0x80 (data memory)
3254         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3255           operands (genAddLit expects the iCode's operands to swapped as
3256           well), fixed leftover bytes (crashed for short left operands)
3257         * (pic16_genMinusDec): performance improvements, removed false
3258           PIC14 emitSKPNCs
3259         * (pic16_genMinus): fixed to cope with differently sized operands
3260         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3261           for --obanksel > 1
3262         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3263         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3264           new banksel optimization
3265         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3266           analysis for temporary registers (segfaults...)
3267         * src/pic16/peeph.def: added rule
3268
3269 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3270
3271         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3272         which converts a float number to its ASCII representation
3273         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3274         functions to convert the fractional and integer part of a float to ASCII,
3275         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3276         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3277         ram
3278         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3279         _STATMEM macros,
3280         * device/include/pic16/adc.h: added GPL info,
3281         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3282         a pCodeOp as tested operand,
3283         * (genNearPointerGet): optimized bit testing, does not use
3284         intermediate register for bit value, test directly instead with
3285         BTFSS, BTFSC, works only for single bits,
3286         * (genpic16Code): dump the name of the iCode in the asm,
3287         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3288         renamed to pic16_decodeOp,
3289         * (serialRegAssign): do not allocate a temporary register for iCode
3290         sequences that test a single bit for 1/0
3291
3292 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3293
3294         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3295         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3296         access stack and frame pointers. They are initially assigned to
3297         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3298         accessing SFRs. Updated all occurences of modification of stack or
3299         frame pointer in gen.c and pcode.c,
3300         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3301         assigning of a literal value to pointers,
3302         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3303         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3304         selected
3305
3306 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3307
3308         * doc/sdccman.lyx: update documentation about stack pragma, added
3309         some info for stack memory models
3310
3311 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3312
3313         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3314
3315 2005-01-08 Raphael Neider <rneider AT web.de>
3316
3317         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3318           udata sections to fix bug #1097823
3319
3320 2005-01-05 Raphael Neider <rneider AT web.de>
3321
3322         * src/pic16/gen.c (genGenericShift): added handling of differently
3323           sized left operand and result
3324
3325 2005-01-04 Raphael Neider <rneider AT web.de>
3326
3327         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3328         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3329           to hold the condition bit)
3330         * added new version of genCmp (old code available via #define)
3331         * added new version of genShiftLeft/genShiftRight in a generic
3332           way, now supports shifting by negative values
3333         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3334           shiftCount (expected by genGenericShift)
3335         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3336         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3337           dump
3338         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3339           is an invalid literal too...)
3340
3341 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3342
3343         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3344         from Raphael Neider,
3345         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3346         for 8-bit literals. This fixes some literal operands which are sign
3347         extended to 16-bits ints when instruction needs only 8-bits.
3348
3349 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3350
3351         * device/lib/logf.c: added mcs51 assembly version
3352         * device/lib/expf.c: added mcs51 assembly version
3353         * device/lib/_logexpf.c: new shared asm code for expf and logf
3354         * device/include/math.h: add defines for assembly math library
3355         * device/lib/Makefile.in: build new _logexpf.c
3356         * device/lib/libfloat.lib: use new _logexpf.c
3357
3358 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3359
3360         * src/pic/device.c
3361         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3362           device types which have less than 0x7f registers.
3363
3364 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3365
3366         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3367
3368 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3369
3370         * device/lib/printf_fast.c: only build on supported arch.
3371         * device/lib/printf_tiny.c: only build on supported arch.
3372         * device/lib/printf_fast_f.c: only build if asm float lib
3373         * device/lib/_fsget1arg.c: only build if asm float lib
3374         * device/lib/_fsget2args.c: only build if asm float lib
3375         * device/lib/_fsnormalize.c: only build if asm float lib
3376         * device/lib/_fsreturnval.c: only build if asm float lib
3377         * device/lib/_fsrshift.c: only build if asm float lib
3378         * device/lib/_fsswapargs.c: only build if asm float lib
3379         * device/include/stdio.h: don't provide print_fast,
3380           print_fast_f, print_tiny prototypes if --xstack used
3381
3382 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3383
3384         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3385         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3386           to the SOURCES
3387
3388 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3389
3390         * device/lib/printf_fast_f.c: same as printf_fast, but
3391           with floating point enabled
3392         * device/lib/printf_fast.c: minor tweaks
3393         * device/include/stdio.h: add printf_fast_f
3394
3395 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3396
3397         * src/SDCCmain.c: make --float-reent default for mcs51
3398         * device/lib/_fsadd.c: added mcs51 assembly version
3399         * device/lib/_fssub.c: added mcs51 assembly version
3400         * device/lib/_fsmul.c: added mcs51 assembly version
3401         * device/lib/_fsdiv.c: added mcs51 assembly version
3402         * device/lib/_fseq.c: added mcs51 assembly version
3403         * device/lib/_fsneq.c: added mcs51 assembly version
3404         * device/lib/_fsgt.c: added mcs51 assembly version
3405         * device/lib/_fslt.c: added mcs51 assembly version
3406         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3407         * device/lib/Makefile.in: add _fscmp to build
3408         * device/lib/libfloat.lib: add _fscmp to build
3409
3410 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3411
3412         * device/lib/_fs2slong.c: added mcs51 assembly version
3413         * device/lib/_fs2sint.c: added mcs51 assembly version
3414         * device/lib/_fs2schar.c: added mcs51 assembly version
3415         * device/lib/_fs2ulong.c: added mcs51 assembly version
3416         * device/lib/_fs2uint.c: added mcs51 assembly version
3417         * device/lib/_fs2uchar.c: added mcs51 assembly version
3418         * device/lib/_slong2fs.c: added mcs51 assembly version
3419         * device/lib/_sint2fs.c: added mcs51 assembly version
3420         * device/lib/_schar2fs.c: added mcs51 assembly version
3421         * device/lib/_ulong2fs.c: added mcs51 assembly version
3422         * device/lib/_uint2fs.c: added mcs51 assembly version
3423         * device/lib/_uchar2fs.c: added mcs51 assembly version
3424         * device/include/float.h: added #define to select asm vs c
3425
3426 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3427
3428         * device/lib/printf_fast.c: improvements to float output
3429         * device/include/float.h: add defines for assembly float library
3430         * device/lib/_fsget1arg.c: receive 1 float arg
3431         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3432         * device/lib/_fsnormalize.c: normalize a float
3433         * device/lib/_fsreturnval.c: return float, various helper routines
3434         * device/lib/_fsrshift.c: right shift a float's mantissa
3435         * device/lib/_fsswapargs.c: swap 2 floats
3436         * device/lib/Makefile.in: build these 6 new files for mcs51
3437         * device/lib/libfloat.lib: add these 6 files to the library
3438
3439 2004-12-26 Borut Razem <borut.razem AT siol.net>
3440
3441         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3442           built by gcc 3.4.2
3443
3444 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3445
3446         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3447           and fully reentrant and register bank neutral.
3448         * device/lib/printf_fast.c: added float (not enabled by default),
3449           added compact/slower integer (also not enabled by default),
3450           improved size/speed of fast integer code, other minor changes
3451         * device/include/stdio.h, device/lib/Makefile.in,
3452           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3453
3454 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3455
3456         * src/pic16/pcode.c: declaring variables other than at the start of a
3457           block is not supported in C by VC6.
3458
3459 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3460
3461         * applied a previous patch from Raphael Neider that wasn't included
3462         in the previous commits, which fixes infinite loops within jumptable
3463         improvements,
3464         * made some fixes that previous patches introduced
3465
3466 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3467
3468         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3469         that fixes an issue with AOP_PCODE asmop's offset,
3470         * (pic16_popCopyReg): update instance field too,
3471         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3472         function of pic port,
3473         * (genCmp, genAnd, genAssign),
3474         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3475
3476 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3477
3478         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3479         variables initial values to idata section,
3480         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3481         variables in some functions. This utilizes parmBytes field of iCode
3482         structure to hold the offset of the variable in stack. (might be
3483         able to use the stack field too?)
3484         * applied patch from Raphael Neider # ### , # ###
3485         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3486         variable initial values in idata section,
3487         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3488         for static variables with initial value
3489         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3490         applied fix in while loop from Raphael Neider.
3491
3492 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3493
3494         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3495         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3496         * src/ds390/ralloc.c (serialRegAssign): spill bits
3497         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3498         * support/Util/SDCCerr.c,
3499         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3500         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3501         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3502
3503 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3504
3505         * device/include/sdcc-lib.h: inserted LGPL, added includes
3506           asm/ds390/features.h and asm/mcs51/features.h
3507         * device/include/asm/default/features.h,
3508         * device/include/asm/gbz80/features.h,
3509         * device/include/asm/z80/features.h: added empty _AUTOMEM
3510           and _STATMEM
3511         * device/include/asm/ds390/features.h,
3512         * device/include/asm/mcs51/features.h: added files with defines for
3513           _AUTOMEM and _STATMEM indicating automatic and static storage class
3514         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3515         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3516         * src/SDCCicode.c (geniCodeCast),
3517         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3518         * src/SDCCloop.c (loopInduction): removed unused variable lr
3519         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3520           to convertToFcall to include char modulo (RFE 1065037), added check
3521           if left operand is unsigned and use abs of literal value
3522         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3523           as it doesn't work after conversion from peephole.def to peephole.rul
3524         * src/mcs51/gen.c (toBoolean): added check for size,
3525           (genModOneByte): optimized code for signed char modulo a literal
3526           power of 2 (thanks to Hubert Sack),
3527           (genRRC): removed unnecessary "clr c",
3528           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3529         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3530           jump optimization,
3531           swapped rules 256.c and 256.d,
3532           extended 256.d by using new multiple checks (thanks Erik),
3533           added rules 256.e and 256.f,
3534           updated rule 261.a and 261.b to new generated code
3535         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3536
3537 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3538
3539         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3540           induction related bugs, including first part of bug #1074377
3541
3542 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3543
3544         * applied patch from bug-report #1076292,
3545         * applied patches for genAnd and Goto-optimizations for Raphael
3546         Neider,
3547         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3548         dump a less iCode information,
3549         * src/pic16/device.h (pic16_options_t): added field debgen,
3550         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3551         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3552         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3553         puclic,
3554         * (various functions): added macros FENTRY and FENTRY2 to functions,
3555         to emit function prologue,
3556         * (various functions): fixed indentation,
3557         * (genNearPointerGet): fixed loading of FSR0,
3558         * (genPackBits): applied patch from Raphael Neider to fix updating
3559         of FSR0 and touching only the modified bits,
3560         * src/pic16/genarith.c (various functions): added macros FENTRY to
3561         emit function prologue in comments,
3562         * src/pic16/pcode.h: added functions debugf2, debugf3,
3563         * src/pic16/ralloc.c: partial fix for packForPush caused
3564         segmentation fault,
3565
3566 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3567
3568         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3569           <stsp AT users.sourceforge.net> with reversed byte order
3570         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3571
3572 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3573
3574         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3575           bug #1074377
3576         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3577         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3578
3579 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3580
3581         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3582
3583 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3584
3585         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3586           conditions,
3587           (setFromConditionArgs): friendly operand parser for peephole rules,
3588           (operandBaseName, operandsNotRelated): new peephole condition
3589           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3590           architecture specific register naming into account, handles n-way
3591           comparisons, and supports quoted literals
3592         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3593
3594 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3595
3596         * src/mcs51/peeph.def: fixed bug #1076940
3597
3598 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3599
3600         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3601
3602 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3603
3604         Adding support for replacing ljmps with sjmps in jumptables
3605         generated for switch statements. For now you need to set the
3606         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3607         Now 4 algorithms for mcs51 jumptable generation are used:
3608         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3609         addresses loaded pc-relative for up to 112 cases and stack-pushing
3610         target addresses loaded with offset from dptr for up to 256 cases.
3611
3612         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3613         * src/mcs51/main.c: adapted constants for switch table generation
3614         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3615
3616 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3617
3618         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3619         * support/regression/tests/bug1057979.c: added test for bug 1073386
3620
3621 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3622
3623         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3624         compilers
3625
3626 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3627
3628         * src/pic16/device.h,
3629         * src/pic16/genarith.c,
3630         * src/pic16/glue.c,
3631         * src/pic16/main.c,
3632         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3633
3634 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3635
3636         Large cummulative patch for pic16 port.
3637         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3638         to call when a stack overflow occurs,
3639         * (malloc.h): added CVS Id tag,
3640         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3641         variable,
3642         * added libc directory. The current version of LibC contains string
3643         functions, ctype functions and macros and some functions of the
3644         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3645         be extensively tested in the future. Standard disclaimer here.
3646         Library is not automatically build yet. But one can build it by
3647         invoking 'make' inside the libc directory.
3648         * added ADC library under libio. Preliminary version yet.
3649
3650         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3651         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3652         aopForRemat() now and not by pic16_aopOp(),
3653         * (pic16_popGetTempReg): removed warning messgae when allocating
3654         temporary registers, its a buggy feature and will be removed,
3655         * (pic16_popGet): set register instance field in AOP_CRY,
3656         * (pic16_outBitC): fixed for results in size greater than 1,
3657         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3658         * (pic16_storeForReturn): optimized return of 0,
3659         * (genCmp): experimental code for new genCmp which uses PIC18's
3660         special compare&skip instructions. Initial tests fail some times
3661         with variables grater than 1 byte in size, so new code is disabled,
3662         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3663         a single bit,
3664         * (genCast): began a fix to optimize the casting of a bit to another
3665         bit, now assigning a bitfield to another bitfield will fail, sorry,
3666         * src/pic16/main.c: disabled the use of lr-support feature,
3667         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3668         * added some function prototypes, added function _debugf prototype,
3669         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3670         bits with offset (case PO_GPR_BIT),
3671         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3672         command line,
3673         * (isBankInstruction): modified to return 0 for no banking instruction,
3674         and 1 for banking instruction,
3675         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3676         caused stop processing pCodes after a inline assembly block,
3677         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3678         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3679         registers when it shouldn't,
3680         * src/pic16/ralloc.c (allocReg): add preliminary support for
3681         supporting a limited set of temporary registers,
3682
3683 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3684
3685         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3686           genDataPointerSet): ensure assignments always copy in MSB to LSB
3687           order,
3688           (loadRegFromAop): recognize CLRH optimization,
3689           (genFunction): optimize RECEIVE iCodes in reentrant functions
3690
3691 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3692
3693         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3694           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3695           selected.
3696         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3697         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3698           contiguous with data
3699
3700 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3701
3702         * device/lib/_gptrget.c (_gptrget),
3703         * device/lib/_gptrgetc.c (_gptrgetc),
3704         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3705           instead of sjmp to ret
3706         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3707           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3708
3709 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3710
3711         * .version: bumped version to 2.4.7
3712         * device/lib/_gptrget.c (_gptrget): is now _naked
3713         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3714         * device/lib/_gptrput.c (_gptrput): is now _naked
3715         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3716           (createFunction): fixed xstack
3717         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3718         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3719           or bit either,
3720           (geniCodeCritical): store original interrupt state in an iTemp bit
3721           var unless stack-auto
3722         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3723         * src/SDCCmain.c (setIncludePath): added include/target to search path
3724         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3725         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3726           prototype,
3727           (processFuncArgs): put bit vars in bit area
3728         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3729           unsaveRBank): fixed xstack,
3730           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3731           (genFunction, genEndFunction): fixed xstack,
3732           (genAssign): optimization don't walk backwards through mem
3733         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3734         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3735         * support/regression/Makefile: also make library (for stack-auto) when
3736           making "all" and added "test-mcs51-xstack-auto"
3737         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3738         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3739         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3740         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3741         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3742           make-library by MAKE_LIBRARY
3743         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3744           regression tests for xstack
3745         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3746         * support/regression/tests/critical.c: test for critical on mcs51
3747
3748 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3749
3750         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3751           built version of sdcc instead of installed version
3752
3753 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3754
3755         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3756         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3757           vprintf.c now
3758         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3759         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3760           WARNING: remove device/lib/build/z80/printf.o by hand when
3761           updating from previous build!
3762         * device/lib/z80/printf.c: updated comment
3763         * support/regression/tests/bug1057979.c: test all ports now
3764         * support/regression/tests/bug1065458.c: file added
3765
3766 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3767
3768         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3769           *_start and *_end symbols for static functions
3770
3771 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3772
3773         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3774           and search crt0.o in all library paths,
3775           (setIncludePath): proper handling of --nostdinc,
3776           (setLibPath): proper handling of --nostdlib
3777         * support/regression/Makefile,
3778         * support/regression/ports/ds390/spec.mk,
3779         * support/regression/ports/gbz80/spec.mk,
3780         * support/regression/ports/hc08/spec.mk,
3781         * support/regression/ports/mcs51/spec.mk,
3782         * support/regression/ports/mcs51-large/spec.mk,
3783         * support/regression/ports/mcs51-stack-auto/spec.mk,
3784         * support/regression/ports/z80/spec.mk: use include and lib files from
3785           built version of sdcc instead of installed version
3786         * doc/sdccman.lyx: fixed typo in --nostdinc
3787
3788 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3789
3790         * src/pic/pcode.c,
3791         * src/pic/device.c,
3792         * src/pic/ralloc.c,
3793         * src/pic/gen.c : added support to generate code for struct bit fields.
3794
3795 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3796
3797         * as/xa51/xa_version.h,
3798         * device/include/errno.h,
3799         * device/include/regc515c.h,
3800         * device/lib/_itoa.c,
3801         * device/lib/_ltoa.c,
3802         * device/lib/ser_ir_cts_rts.c,
3803         * sim/ucsim/xa.src/glob.cc,
3804         * sim/ucsim/xa.src/inst_gen.cc,
3805         * sim/ucsim/xa.src/xa_bit.cc,
3806         * sim/ucsim/xa.src/xa_sfr.cc,
3807         * sim/ucsim/z80.src/inst_dd.cc,
3808         * sim/ucsim/z80.src/inst_fdcb.cc,
3809         * support/scripts/keil2sdcc.pl,
3810         * src/pic16/pic16.dsp,
3811         * src/pic16/pic16a.dsp: corrected cvs line endings
3812         * device/lib/printf_large.c: fixed bug 1057979
3813         * src/pic16/gen.c: fixed non-C standard code
3814         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3815         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3816         * support/regression/ports/mcs51/support.c: reload T1 asap
3817         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3818           pdata use and clear idata startup behaviour
3819         * support/regression/tests/bug1057979.c: added
3820
3821 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3822
3823         * device/examples/ds390/ow390/ad26.h,
3824         * device/examples/ds390/ow390/cnt1d.h,
3825         * device/examples/ds390/ow390/crcutil.c,
3826         * device/examples/ds390/ow390/ownet.h,
3827         * device/examples/ds390/ow390/owsesu.c,
3828         * device/examples/ds390/ow390/swt12.h,
3829         * device/examples/ds390/ow390/swtoper.c,
3830         * device/examples/ds390/ow390/temp10.h,
3831         * device/examples/ds390/ow390/thermodl.c,
3832         * device/examples/ds390/tinitalk/tinitalk.dsp,
3833         * device/examples/ds390/tinitalk/tinitalk.dsw,
3834         * device/examples/mcs51/clock/hw.h,
3835         * device/examples/mcs51/simple2/go.bat,
3836         * device/examples/serialcomm/windows/serial.h,
3837         * device/examples/xa51/dummy.c,
3838         * device/examples/xa51/hello.c,
3839         * device/include/80c51xa.h,
3840         * device/include/at89x051.h: corrected cvs line endings
3841
3842 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3843
3844         * src/pic16/main.c (options): added command line --gstack, to trace
3845         stack over/under flows,
3846         * added pragma 'wparam' to allow passing first byte of function
3847         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3848         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3849         call to __gstack_test function and sets up the symbol as extern,
3850         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3851         * popaop): added call to pic16_testStackOverflow,
3852         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3853         wparamList list,
3854         * (genCall, genPcall): now all parameters are passed via stack
3855         except in functions that are pass to wparam pragma in which WREG is
3856         used too,
3857         * (genPcall): REENTRANT flag is checked to see if variable prototype
3858         contains reentrant keyword, don't call a non-reentrant function, via
3859         a reentrant function pointer or vice versa, functions are never
3860         passed via WREG,
3861         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3862         D.Winkler,
3863         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3864         SIGSEGV when accessing a NULL register stucture,
3865         * (pic16_printGPointerType): modified to handle UPPER modifier for
3866         function initializers, changed prototype of function to simpler one,
3867         * (pic16_printIvalFuncPtr): check to see if function is already
3868         added in externs list,
3869         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3870         optimized a move from W to SFR with a move to the same register
3871         later after a CALL,
3872         * device/lib/pic16/debug: NEW directory, contains debug features
3873         which are enabled when linking with libdebug.lib, currently command
3874         line option --gstack enables stack pointer tracing for over/under
3875         flow, corresponding sources are in debug/gstack
3876
3877 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3878
3879         * doc/sdccman.lyx: updated SDCC version,
3880         * (PIC16 port): update list of command line options,
3881         * src/pic16/device.h (structure pic16_options_t): added field gstack
3882         to enable stack overflow tracing on push/pops,
3883         * src/pic16/device.c (statistics structure): added statistics
3884         structure,
3885         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3886         pic16_dump_int_registers): increase statistics counters for each
3887         * variable which is encountered
3888         * (pic16_dump_usection): emit each .udata variable to its own udata
3889         section,
3890         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3891         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3892         parameters via stack, otherwise use old scheme,
3893         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3894         assembler output file,
3895         * src/pic16/main.c: added command line options --gstack to enable
3896         push/pop tracing for stack overflow,
3897         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3898         instructions): added size of each instruction,
3899         * (pic16_countInstruction): estimate size of instructions in
3900         the_pFile list, inline assembly blocks are not counted,
3901         * (pic16_FixRegisterBanking): trace previous register usage, when
3902         banksel optimizations is greater than 0, don't emit a redudant
3903         banksel directive,
3904
3905 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3906
3907         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3908         * src/pic16/ralloc.c : applied same fix for pic16.
3909         * src/pic/gen.c : tidied it up a little.
3910
3911 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3912
3913         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3914         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3915
3916 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3917
3918         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3919
3920 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3921
3922         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3923         non-reentrant function __modsint in the interrupt function (thus
3924         corrupting math operations during serial I/O)
3925         * device/lib/ser_ir.c: as above, changed buffersize
3926         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3927         256.c,d for zeroing
3928         * doc/Makefile: added option -t for rsync
3929
3930 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3931
3932         * src/SDCCast.h (struct ast),
3933         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3934
3935 2004-10-20 Borut Razem <borut.razem AT siol.net>
3936
3937         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3938         package
3939
3940 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3941
3942         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3943         makefile targets,
3944         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3945         support functions to replace long sequences of MOVFF's from access
3946         bank registers to stack and vice versa,
3947         * src/pic16/device.h: added new field opt_flags, where optimization
3948         flags can be set to enable certain features,
3949         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3950         * pBlock, (genFunction, genEndFunction): surroung loop for
3951         saving/loading used registers in stack with PC_INFO pCodes,
3952         INF_LREGS. Code in between can then be optimized by pCode optimizer
3953         to support function calls,
3954         * (genDataPointerSet): fixed bug which loaded float fields in
3955         structures with corrupt data,
3956         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3957         in a standard way debug info on stderr. Feature used for developing
3958         and debugging only,
3959         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3960         obsolete chunks of code,
3961         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3962         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3963         * pic16/src/pcode.c (pic16_newpCodeInfo,
3964         * (pic16_newpCodeOpLocalRegs),
3965         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3966         feature,
3967         * (pic16_pCodeConstString): printing of the initial value of a
3968         symbol as a comment is inhibited since parsing was already done by
3969         copyStr and output is corrupt,
3970         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3971
3972 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3973
3974         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3975
3976 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3977
3978         * as/mcs51/lkarea.c: removed old K&R style,
3979           (lnksect): changed check on boundary error,
3980           (lnksect2): changed check on boundary error,
3981           (lnksect2): extend XSTK to end of page if size = 1
3982         * as/mcs51/lkmain.c: removed old K&R style,
3983           (Areas51): create l_IRAM symbol
3984         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3985         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3986           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3987         * device/lib/_mullong.c: added version to be compiled with xstack
3988         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3989         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3990         * device/lib/mcs51/crtxstack.asm: fixed comment
3991         * src/SDCCglue.c: maxInterrupts defaults to 0,
3992           (emitMaps): added pdata,
3993           (createInterruptVect): (re)moved default,
3994           (glue): added pdata,
3995           (glue): moved __start__xstack to XSTK with default size 1
3996         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3997           and options.float_rent when options.stackAuto is set,
3998           (linkEdit): only write XDATA_NAME if provided on command line
3999         * src/SDCCmem.h,
4000         * src/SDCCmem.c: added pdata
4001         * src/port.h: added pdata_name to PORT
4002         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
4003           (saveRegisters, unsaveRegisters): removed usage of B,
4004           (genMinus): fixed accumulator clash,
4005           (genJumpTab): added comment, this needs another look
4006         * src/mcs51/gen.c: added check for "B in use" paranoia,
4007           added pushB() and popB()
4008         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
4009           chance
4010         * src/avr/main.c,
4011         * src/ds390/main.c,
4012         * src/hc08/main.c,
4013         * src/mcs51/main.c,
4014         * src/pic/main.c,
4015         * src/pic16/main.c,
4016         * src/xa51/main.c,
4017         * src/z80/main.c: (reset_regparms) made void parameter explicit and
4018           added PSEG (PAG,XDATA) or NULL to port specifier
4019         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
4020         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
4021           (_mcs51_genInitStartup): removed __start__xstack equ,
4022           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
4023         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
4024         * src/z80/gen.c (_rleAppend): fixed warnings
4025         * support/regression/tests/zeropad.c: added pdata test
4026         * .version: bumped to 2.4.6
4027
4028 2004-10-17 Borut Razem <borut.razem AT siol.net>
4029
4030         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
4031         as a part of nightly build
4032
4033 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
4034
4035         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
4036         WREG holds the first byte function parameters,
4037         * (aopForSym): take special case for symbols which are in FARSPACE
4038         but in CODESPACE too,
4039         * (assignResultValue): modified to take into account _G.useWreg,
4040         * (genCall): don't use wreg for parameter passing when function is
4041         declared as reentrant, too, added optimization INCF to stack
4042         pointer when stack parameter count is 1,
4043         * (genFunction, genEndFunction): refurnished and fixed to not using
4044         wreg for passing parameters when function has varargs or is
4045         reentrant, fixed bug with symbol name compare for generating
4046         functions in absolute address,
4047         * (pic16_storeForReturn): refurnished,
4048         * (genCmp): began writing a new version of the function, not ready
4049         yet, therefore it is disabled,
4050         * (genAssign): do not read code memory when assigning a function to
4051         a pointer function,
4052         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4053         array of characters, not pointer,
4054         * (pic16initialComments): in debug mode emit an .ident directive for
4055         the assembler,
4056         * (_process_pragma): emit a new warning type (internal to pic16)
4057         when setting stack to default length, emit a similar warning when
4058         placing a function at absolute address and address is not word aligned
4059         * (_pic16_parseOptions): added 'return TRUE' statement,
4060         * (_pic16_linkEdit): if compiling a source, then add the source's
4061         file object, first in the list of objects to link,
4062
4063 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4064
4065         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4066         * src/pic/main.c : removed VC warning.
4067         * src/pic/gen.c : changed comment.
4068
4069 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4070
4071         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4072         reference to a deprecated symbol _GPTRREG was causing failure to
4073         link. Thanks G. M. Gallant for the info.
4074
4075 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4076
4077         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4078         comments for Bugs item #954788.
4079
4080 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4081
4082         * src/pic16/device.c (pic16_dump_gsection,
4083         * pic16_groupRegistersInSection): handle symbols declared to be in
4084         access bank differently,
4085         * src/pic16/gen.c (struct _G): added field resDirect,
4086         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4087         send values read from stack directly to result and don't allocate
4088         temporary values,
4089         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4090         same registers,
4091         * (pic16_sameRegsOfs): NEW,
4092         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4093         free because they were not allocated from temporary pool,
4094         * pic16_popRegFromString): workaround to fix a problem with
4095         allocating variables twice or never,
4096         * (genGenPointerGet): using PRODL instead of FSR0H,
4097         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4098         instead of FSR0H,
4099         * (genAssign): take advantage of the _G.resDirect flag,
4100         * (genCast): around line 11844, use mov2f instead of directly
4101         MOVFF'ing between operands to account for literal values,
4102         * src/pic16/genutils.c: some new debug functions for gpsim have been
4103         added,
4104         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4105         float with integer part only,
4106         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4107         place variables in access bank
4108         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4109         updated sources to reflect recent changes in gen.c
4110
4111 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4112
4113         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4114         sources that searched for headers in installation path, now the
4115         device/include/pic16 is used,
4116         * src/pic16/glue.c (pic16glue),
4117         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4118         .line directives if not in debug mode, this suppresses assembler's
4119         warnings for ignored directives
4120
4121 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4122
4123         * src/port.h: made reset_regparms prototype void parameter explicit.
4124         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4125         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4126         * doc/sdccman.lyx: documented warning disabling and how to use
4127           printf_large to make it print floats.
4128         * device/include/stdbool.h: NEW
4129         * device/lib/_atof.c,
4130         * device/lib/_divuint.c,
4131         * device/lib/_divulong.c,
4132         * device/lib/expf.c,
4133         * device/lib/printf_large.c,
4134         * device/lib/sincosf.c,
4135         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4136         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4137           a completely reentrant lib.
4138
4139 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4140
4141         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4142         * device/include/pic16/stdio.h: fixed bug with colon
4143
4144 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4145
4146         * device/include/pic16/stdio.h,
4147         * device/include/pic16/stdlib.h,
4148         * device/include/pic16/math.h: NEW
4149         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4150         declared as _naked to reduce overhead
4151         * device/lib/Makefile.in (target port-specific-objects-pic16):
4152         changed * to *.* so to ignore the CVS directory,
4153         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4154         stacked variables back in stack,
4155         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4156         corruption
4157
4158 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4159
4160         * .version: bumped version number to 2.4.5
4161         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4162         * support/Util/SDCCerr.c (messages structure): added entry for
4163         W_POSSBUG2
4164
4165         Large cumulative patch for pic16 port and libraries.
4166         * device/include/pic16/sdcc-lib.h,
4167         * device/include/pic16/stdarg.h,
4168         * device/include/asm/pic16/features.h,
4169         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4170         * device/include/pic16/float.h: changes reentrant keyword with
4171         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4172         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4173         updated target build-libraries to include objects from gptr,
4174         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4175         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4176         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4177         all function headings,
4178         * src/SDCCmain.c: added global parameter userIncDirsSet,
4179         * (parseCmdLine): when option -I is encountered add directory to
4180         userIncDirsSet too,
4181         * src/version.awk: added space between control and long,
4182         * src/pic16/NOTES: added some notes for the port,
4183         * src/pic16/gen.c: added prototype for mov2fp function,
4184         * (fReturnpic16[]): properly named return value registers,
4185         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4186         * (aopForSym): added code to handle symbols with onStack flag set,
4187         symbols onStack are allocated PTRSIZE bytes,
4188         * (aopFreeAsmop): handles special case where asmops are stack objects,
4189         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4190         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4191         added argument lock to trace flaws in allocating temporary registers
4192         when developing port,
4193         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4194         * (pic16_popRegFromString): reenabled allocating a direct register
4195         from string,
4196         * (assignResultValue): various beautifications,
4197         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4198         referenced function argument,
4199         * (genIpush): reenabled to allow stacked arguments, handles only
4200         ic->parmPush iCodes,
4201         * (genCall, genPcall): major changes to allow for variable argument
4202         functions, fixed a bug with falsely restoring stack pointer after
4203         returning from call,
4204         * (genFunction): pending code for critical function,
4205         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4206         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4207         * (genNearPointerGet): fixed bug with indirect reading, was always
4208         reading from INDF0
4209         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4210         pointers,
4211         * (genAddrOf): rewrote code to take address of a stacked function parameter
4212         * (genCast): fixed casting to generic pointer type,
4213         * src/pic16/gen.h: added AOP_STA,
4214         * (struct asmop): added field stk,
4215         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4216         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4217         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4218         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4219         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4220         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4221         generic pointers,
4222         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4223         and library paths,
4224         * (pic16_port structure): generic pointer size is set to 3,
4225         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4226         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4227         compiler warning,
4228         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4229         operand is an iTemp,
4230
4231 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4232
4233         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4234         * debugger/mcs51/simi.c: addapt new syntax of s51
4235
4236 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4237
4238         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4239         * src/pic16/pcode.c: commented out some calls to free() in order to
4240         fix bug #989576,
4241
4242 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4243
4244         * src/SDCCicode.h,
4245         * src/SDCCicode.c (isiCodeInFunctionCall),
4246         * src/avr/ralloc.c (selectSpil),
4247         * src/pic/ralloc.c (selectSpil),
4248         * src/pic16/ralloc.c (selectSpil),
4249         * src/ds390/ralloc.c (selectSpil),
4250         * src/hc08/ralloc.c (selectSpil),
4251         * src/xa51/ralloc.c (selectSpil),
4252         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4253         stack in the middle of a function call sequence (fixes bug #1020268)
4254         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4255         costs associated with the minimum switch case.
4256
4257 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4258
4259         * src/SDCC.lex: fixed bug #1030549
4260
4261 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4262
4263         * src/SDCCcse.h (struct cseDef),
4264         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4265         over a function call if the CSE is derived from a symbol whose
4266         address has been taken (fixes bug #1029883)
4267         * support/regression/tests/bug-1029883: a new regression test for
4268         this bug
4269
4270 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4271
4272         * src/hc08/gen.c (emitinline): fixed bug #1029778
4273         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4274         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4275         and starts toward RFE #905167)
4276
4277 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4278
4279         * src/pic16/gen.c (mov2f): New function to move an operand to
4280         another without considering if it is a literal or a register,
4281         * (pic16_sameRegs): don't check if they are both AOP_REG,
4282         * (AccRsh): removed andmask=0 lines,
4283         * (genLeftShift): duplicated to be improved in future versions,
4284         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4285         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4286         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4287         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4288         * (insertBankSwitch): fixed inserting banksel directives algorithm
4289         for instructions that follow a skip instruction, this fixes a report
4290         for broken subtraction code generation,
4291         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4292         iCode is a left op, just in case result and right share the same
4293         registers
4294
4295 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4296
4297         * src/hc08/main.c,
4298         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4299         preservation of HX
4300         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4301         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4302         on 2004-09-12; it was buggy
4303
4304 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4305
4306         * src/SDCCsymt.h: removed RESULT_CHECK
4307         * src/SDCCast.c,
4308         * src/SDCCglue.c,
4309         * src/SDCCval.c,
4310         * src/pic/glue.c,
4311         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4312
4313 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4314
4315         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4316         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4317         configuration values no more rejected by compiler, they are assigned
4318         to configuration registers with a warning message instead,
4319         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4320         the for-loop so last conf register is emitted too,
4321         * (_pic16_initPaths): link library libsdcc.lib by default,
4322         * (_hasNativeMulFor): modified test for multiplication according to
4323         Raphael Neider's remarks. Integer multiplication is also done with
4324         support functions,
4325         * device/include/pic16/pic18fregs.h: corrected type error in while
4326         testing and including 18f6720 header file
4327
4328 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4329
4330         * src/pic16/device.h (pic16_options): removed field use_crt,
4331         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4332         until an optimization to handle single bits is added,
4333         * (pic16_loadFSR0): moved before genUnpackBits,
4334         * (genAnd): some white lines removed,
4335         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4336         leave_reset flags in pic16_options when using crt modules,
4337
4338 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4339
4340         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4341           for bugs 898889 & 979599. Also used some safer print instructions.
4342
4343 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4344
4345         * src/pic16/device.h (pic16_options_t): added field use_crt,
4346         crt_name, no_crt,
4347         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4348         catch a probable future bug,
4349         * src/pic16/gen.c: aopIdx function commented out,
4350         * (genAssign): commented out old code which used aopIdx,
4351         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4352         code, added if conditionals to take into account the --use-crt
4353         command line options,
4354         * src/pic16/main.c (pic16_optionsTable): added new command line
4355         options, --use-crt= and --no-crt,
4356         * (_pic16_linkEdit): now the proper crt object is added in the
4357         linker command line except than when --no-crt is specified,
4358         * src/pic16/pcode.c,
4359         * src/pic16/pcode.h: added some structures and functions for a new
4360         optimization scheme to compansate for instruction overhead between
4361         same iCodes, this scheme is currently under development and is not
4362         working in any way,
4363         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4364         to && operator,
4365         * device/lib/pic16/startup/crt0i.c,
4366         * device/lib/pic16/startup/crt0iz.c: added global char variable
4367         __uflags to force the generation of an idata section
4368
4369 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4370
4371         * doc/Makefile,
4372         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4373         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4374
4375 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4376
4377         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4378         Frieder) and clarified the default code optimization mode
4379
4380 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4381
4382         * src/SDCC.lex (doPragma, process_pragma),
4383         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4384         "opt_code_size", and "opt_code_balanced"
4385         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4386         regrouped options by category, added support for category headers
4387         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4388         and "--opt-code-size"
4389         * doc/sdccman.lyx: documented these new options and pragmas
4390         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4391         preference into account
4392
4393 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4394
4395         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4396           geniCodePreDec): Fixed bug 904237 by generating a warning
4397         * src/SDCCerr.h,
4398         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4399
4400 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4401
4402         * src/pic/device.c : When no max ram set validate full memory range.
4403         * src/pic/pcode.c,
4404         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4405
4406 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4407
4408         * device/lib/_gptrget.c,
4409         * device/lib/_gptrput.c: updated comment
4410         * device/lib/calloc.c,
4411         * device/lib/free.c,
4412         * device/lib/malloc.c,
4413         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4414         * src/SDCCcse.c (cseBBlock),
4415         * src/SDCCicode.c (printOperand, geniCodeArray),
4416         * src/SDCCicode.h (struct operand): fixed bug 868103
4417         * support/regression/tests/bug-868103.c: added
4418         * src/SDCCast.c (searchLitOp),
4419         * src/SDCCcse.h (struct cseDef),
4420         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4421         * src/SDCCicode.h (struct operand),
4422         * src/SDCCsymt.h (struct sym_link),
4423         * src/avr/gen.c (hasInc),
4424         * src/ds390/gen.c (hasInc),
4425         * src/hc08/gen.c (genPlusIncr, hasInc),
4426         * src/mcs51/gen.c (hasInc),
4427         * src/pic16/glue.c (pic16_printIvalChar),
4428         * src/pic16/ralloc.c (regWithIdx),
4429         * src/xa51/gen.c (hasInc) : removed warnings
4430         * src/SDCCast.c (createBlock): added comment ???
4431         * src/hc08/ralloc.c: updated comments
4432
4433 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4434
4435         * doc/sdccman.lyx: updated section on switch statements, added
4436         section about semaphore locking
4437         * doc/Makefile: added option -info for latex2html
4438         * device/lib/_gptrget.c,
4439         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4440
4441 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4442
4443         * src/pic/device.h,
4444         * src/pic/device.c,
4445         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4446          maxram is less than 0x100.
4447
4448 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4449
4450         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4451
4452 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4453
4454         * src/port.h,
4455         * src/mcs51/main.c,
4456         * src/ds390/main.c,
4457         * src/z80/main.c,
4458         * src/hc08/main.c,
4459         * src/pic/main.c,
4460         * src/pic16/main.c,
4461         * src/avr/main.c,
4462         * src/xa51/main.c
4463         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4464         a jump table is the best form for a switch statement, including
4465         automatic insertion of missing cases to make the case range
4466         continuous. Developed in collaboration with Frieder Ferlemann.
4467
4468 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4469
4470         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4471         accumulator result if it needs sign extension
4472
4473 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4474
4475         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4476
4477 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4478
4479         * device/lib/gbz80/printf.c,
4480         * device/lib/z80/printf.c: removed define for NULL
4481
4482 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4483
4484         * as/xa51/xa_link.c,
4485         * device/examples/ds390/ow390/ad26.c,
4486         * device/examples/ds390/ow390/cnt1d.c,
4487         * device/examples/ds390/ow390/counter.c,
4488         * device/examples/ds390/ow390/ds2480.h,
4489         * device/examples/ds390/ow390/ds2480ut.c,
4490         * device/examples/ds390/ow390/findtype.c,
4491         * device/examples/ds390/ow390/gethumd.c,
4492         * device/examples/ds390/ow390/owllu.c,
4493         * device/examples/ds390/ow390/ownetu.c,
4494         * device/examples/ds390/ow390/swt12.c,
4495         * device/examples/ds390/ow390/swtloop.c,
4496         * device/examples/ds390/ow390/temp.c,
4497         * device/examples/ds390/ow390/temp10.c,
4498         * device/examples/ds390/ow390/thermo21.c,
4499         * device/examples/ds390/ow390/tinilnk.c,
4500         * device/examples/ds390/ow390/tstfind.c,
4501         * device/examples/serialcomm/windows/serial.cpp,
4502         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4503         * device/include/reg51.h: fixed line endings for cvs
4504
4505 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4506
4507         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4508         packRegsForAccUse, packRegisters): new accumulator register
4509         packing algorithm
4510         * support/regression/ports/hc08/support.c (_putchar): suppress
4511         warning of unused variable
4512         * src/SDCCicode.c: added SWAP entry to codeTable
4513
4514 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4515
4516         * device/lib/sprintf.c: forgot to add this file before previous commit
4517
4518 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4519
4520         * src/pic16/gen.c (genPackBits): added operand right in function
4521         parameters, load result directly if p_type is POINTER (that is
4522         called by genNearPointerSet)
4523         * (genUnPackBits): added operand left in function parameters,
4524         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4525         FSR0 if accessing bitfields,
4526
4527 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4528
4529         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4530           _print_format; updated printf, sprintf, vsprintf
4531         * device/include/asm/default/features.h: corrected comment/define
4532         * device/lib/Makefile.in: added sprintf.c
4533         * device/lib/libsdcc.lib: added sprintf module
4534         * device/lib/printf_large.c,
4535         * device/lib/vprintf.c,
4536         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4537           into these 3 files
4538         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4539         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4540         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4541           hc08 test
4542         * support/regression/tests/zeropad.c: define idata as data for hc08
4543
4544 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4545
4546         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4547         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4548         labels are referenced at least once (even if a reference is not found)
4549         * src/hc08/gen.c (emitcode): set isComment flag for comments
4550         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4551         loads), rules 6a..6b (optimize jumps to return)
4552
4553 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4554
4555         * device/lib/acosf.c (acosf),
4556         * device/lib/asinf.c (asinf),
4557         * device/lib/atanf.c (atanf),
4558         * device/lib/ceilf.c (ceilf),
4559         * device/lib/cosf.c (cosf),
4560         * device/lib/coshf.c (coshf),
4561         * device/lib/cotf.c (cotf),
4562         * device/lib/fabsf.c (fabsf),
4563         * device/lib/floorf.c (floorf),
4564         * device/lib/log10f.c (log10f),
4565         * device/lib/logf.c (logf),
4566         * device/lib/sinf.c (sinf),
4567         * device/lib/sinhf.c (sinhf),
4568         * device/lib/sqrtf.c (sqrtf),
4569         * device/lib/tanf.c (tanf),
4570         * device/lib/tanhf.c (tanhf),
4571         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4572         replaced all instances of "reentrant" in the library functions
4573         defined in math.h with this macro.
4574         * support/regression/tests/float_trans.c: reenabled test for hc08
4575
4576 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4577
4578         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4579         erroneously deleted
4580
4581 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4582
4583         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4584         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4585         multi-byte volatile operands are used
4586         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4587         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4588         initialization to area GSINIT0 so that it would always precede
4589         any static initializers in GSINIT
4590         * support/regression/tests/zeropad.c: fixed idata define for hc08
4591         * support/regression/tests/bug-927659.c,
4592         * support/regression/tests/float_trans.c: disabled tests for hc08
4593         pending missing library routines
4594         * .version: increased version number to 2.4.4 - hc08 port now passes
4595         regression tests
4596
4597
4598 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4599
4600         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4601         * Makefile.common.in,
4602         * as/Makefile,
4603         * as/hc08/Makefile.in,
4604         * as/mcs51/Makefile.in,
4605         * as/z80/Makefile.in,
4606         * debugger/mcs51/Makefile.in,
4607         * device/include/Makefile.in,
4608         * device/lib/Makefile.in,
4609         * doc/Makefile,
4610         * link/Makefile,
4611         * link/z80/Makefile.in,
4612         * packihx/Makefile.in,
4613         * sim/ucsim/main_in.mk,
4614         * sim/ucsim/avr.src/Makefile.in,
4615         * sim/ucsim/doc/Makefile.in,
4616         * sim/ucsim/gui.src/serio.src/Makefile.in,
4617         * sim/ucsim/hc08.src/Makefile.in,
4618         * sim/ucsim/s51.src/Makefile.in,
4619         * sim/ucsim/xa.src/Makefile.in,
4620         * sim/ucsim/z80.src/Makefile.in,
4621         * src/Makefile.in,
4622         * support/cpp2/Makefile.in,
4623         * support/librarian/Makefile,
4624         * support/makebin/Makefile: added DESTDIR to the install path proposed
4625         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4626         * doc/sdccman.lyx: added DESTDIR documentation
4627
4628 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4629
4630         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4631         instruction for interrupt handlers, use fast returns when returning
4632         from high priority interrupts
4633
4634 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4635
4636         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4637         code generation
4638         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4639         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4640         bugs, ported much of Bernhard's code from mcs51
4641         * src/mcs51/gen.c (genSend),
4642         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4643         than one when calling a reentrant function
4644         * device/lib/_mullong.c: defined an alternate struct layout for big
4645         endian ports (hc08)
4646
4647 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4648
4649         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4650         test
4651
4652 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4653
4654         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4655         are sane and complete before asking the port its prefered parameter
4656         passing method (fixes bug #1017633)
4657         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4658         and _ret3
4659
4660 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4661
4662         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4663         problem in bitfields >= 8 bits.
4664
4665 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4666
4667         * src/SDCCsymt.c: undid changes that were not meant to be committed
4668
4669 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4670
4671         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4672
4673 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4674
4675         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4676           copied and wrong bit got inverted
4677
4678 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4679
4680         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4681         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4682         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4683         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4684         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4685         assignments to bitfields at known addresses
4686         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4687         reads from bitfields at known addresses
4688         * src/hc08/ralloc.c (packRegisters),
4689         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4690         genhc08Code): optimize pointer get values used as conditionals
4691         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4692         and branch
4693
4694 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4695
4696         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4697         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4698         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4699         as conditionals
4700
4701 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4702
4703         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4704
4705 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4706
4707         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4708         related problems
4709
4710 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4711
4712         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4713
4714 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4715
4716         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4717         mcs51 port
4718
4719 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4720
4721         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4722
4723 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4724
4725         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4726         cases use more compact code.
4727
4728 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4729
4730         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4731
4732 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4733
4734         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4735
4736 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4737
4738         * src/SDCCsymt.h,
4739         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4740         parameter of changePointer() from symbol* to sym_link*
4741         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4742         * src/SDCCsymt.c (compareType): void* type is castable to other
4743         pointers, but not necesarily an exact match.
4744         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4745         is no longer blindly treated as an exact match.
4746         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4747
4748 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4749
4750         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4751
4752 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4753
4754         * src/pic/gen.c,
4755         * src/pic/pcode.c,
4756         * src/pic/ralloc.h,
4757         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4758
4759 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4760
4761         * src/pic/device.c,
4762         * src/pic/device.h,
4763         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4764
4765 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4766
4767         * src/mcs51/gen.c (emitcode): fixed bug #992819
4768
4769 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4770
4771         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4772           there's no need to make it worse
4773
4774 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4775
4776         * src/mcs51/ralloc.c (deassignLR),
4777         * src/ds390/ralloc.c (deassignLR),
4778         * src/hc08/ralloc.c (deassignLR),
4779         * src/z80/ralloc.c (deassignLR),
4780         * src/pic/ralloc.c (deassignLR),
4781         * src/pic16/ralloc.c (deassignLR),
4782         * src/avr/ralloc.c (deassignLR),
4783         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4784         rlivePoint): fixed another part of bug #971834
4785
4786 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4787
4788         * src/z80/main.c: enabled "critical" keyword
4789         * src/z80/mappings.i,
4790         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4791         functions (fixes bug #979646)
4792         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4793
4794 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4795
4796         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4797           such as c:\mydir.
4798
4799 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4800
4801         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4802           doesn't disable too much optimizations
4803
4804 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4805
4806         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4807
4808 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4809
4810         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4811
4812 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4813
4814         * src/pic/gen.c tidied up tabs
4815         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4816         * src/pic/main.c tidied up tabs
4817         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4818         * src/pic/pcoderegs.c tidied up tabs
4819         * src/pic/ralloc.c tidied up tabs
4820
4821 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4822
4823         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4824         to S_FIXED for pic16 port and when symbol is not in level 0,
4825         allocate for S_REGISTER storage class and pic16 port, too,
4826         * src/pic16/device.h: prototype for checkSym,
4827         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4828         * (pic16_assignConfigWordValue): test the value and the mask to
4829         validate that the value is suitable for the configuration word,
4830         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4831         collect extern declared symbols, don't emit symbol twice, check
4832         first if symbol is in publics set first,
4833         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4834         * added command line '--fstack' which enables an experimental
4835         feature for stack access, too buggy to be used yet...
4836         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4837         * (pic16_allocDirReg): when register has storage class S_REGISTER
4838         allocate in pic16_dynAccessRegs,
4839         * device/include/pic16/pic18f????.h: modified configuration word
4840         naming convention, words started as CONFIG0H but should be CONFIG1H
4841
4842 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4843
4844         * device/include/mcs51reg.h: fixed bug 970993
4845
4846 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4847
4848         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4849         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4850         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4851         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4852         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4853         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4854           error/warning numbers,
4855           added function setWarningDisabled()
4856         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4857         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4858           _memcmp.c _memmove.c calloc.c realloc.c free.c
4859         * support/regression/tests/malloc.c: added tests for new functionality
4860         * support/regression/tests/zeropad.c: added tests for truncated initializers
4861           and initialized char arrays starting with '\x0'
4862         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4863
4864 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4865
4866         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4867
4868 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4869
4870         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4871         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4872         peephole 177.e. Thanks to anonymous
4873
4874 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4875
4876         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4877         function isn't used in the source but referenced as a
4878         variable initializer then declare it as extern in .asm file
4879
4880 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4881
4882         * .version: increased version number to 2.4.3
4883
4884         Adding version extension according to ChangeLog CVS revision
4885         * src/Makefile.in (target all): added dependency 'version.h'
4886         * (rule version.h): added rule to create version.h from ChangeLog,
4887         * (rule dep): added dependency version.h,
4888         * src/version.awk: AWK script to create version.h
4889         * src/SDCCdwarf2.c (dwWriteModule),
4890         * src/SDCCglue.c (initialComments),
4891         * src/SDCCmain.c (printVersionInfo): modified to write after
4892         version string the version extension number,
4893         * src/SDCCutil.c: included "version.h"
4894         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4895         number,
4896         * src/SDCCutil.h: added prototype for getBuildNumber
4897
4898         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4899         includeDirsSet, too,
4900         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4901         const char [] is found in function prototype...
4902
4903         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4904         moving to WREG with source is already in WREG,
4905         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4906         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4907         * (aopForSym): stack'ed symbols are partially supported, added
4908         if-clause to support symbols in FARSPACE,
4909         * (sameRegs): added test for AOP_ACC to see if registers are same,
4910         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4911         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4912         * (pic16_popRegFromString): will not allocate a new register if it
4913         doesn't find one by name, bug may have introduced...
4914         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4915         * (genIpush): revived to use pic16 port's stack,
4916         * (genAddrOf): added incomplete case for stack'ed operand,
4917         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4918         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4919         can handle multibyte operands,
4920         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4921         * (pic16initialComments): added message for MPLAB compatibility
4922         mode enabled,
4923         * src/pic16/main.h: prototype for pic16_mplab_comp,
4924         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4925         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4926         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4927         because of increased complexity of procedure,
4928         * (_process_pragma): stack pragma changed to format 'stack pos len',
4929         emit symbol '_stack_end' to conform with gplink,
4930         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4931         to search for register,
4932         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4933         PO_GPR_REGISTER,
4934         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4935         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4936         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4937         case for PO_GPR_REGISTER,
4938         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4939         dies, the new era is ahead !...
4940         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4941         pic16_dynInternalRegs,
4942         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4943         * (pic16_allocDirReg): minor optimizations and bug fixes,
4944         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4945
4946         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4947         load stack and frame pointer with address of 'stack_end' symbol
4948
4949 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4950
4951         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4952         without source code but only variable initializers
4953
4954 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4955
4956         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4957         external are not declared as extern to reduce overhead while linking
4958
4959 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4960
4961         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4962
4963 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4964
4965         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4966           Yee Keat for the patch
4967         * src/SDCCast.c (decorateType): fixed bug #979599
4968         * src/ds390/gen.h: removed local fReturnSizeDS390
4969         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4970         * src/ds390/gen.c (genAnd, genOr, genXor),
4971         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4972
4973 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4974
4975         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4976         add relFilesSet to $3, manipulate $2 to handle linking of object
4977         files without source files in command line,
4978         * device/include/pic16 (all headers): added ID location macros,
4979         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4980         entries for ID location bytes,
4981         * (pic16_assignIdByteValue): NEW,
4982         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4983         added field dumpcalltree to pic16_options_t,
4984         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4985         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4986         emitting rFalseIfx label after check_carry label,
4987         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4988         pic16_emitDIRegs), NEW
4989         * (pic16glue): dump .calltree file when option --calltree found,
4990         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4991         * (_pic16_genAssemblerPreamble): emit ID locations after
4992         configuration registers,
4993         * (pic16_linkCmd): modifications of the link command,
4994         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4995         * (pic16_pCodeInitRegisters): don't init stack registers,
4996         * (pic16_findPrevInstruction): fixed bug,
4997         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4998         bug with immediate registers,
4999         * (buildCallTree): traces stack push and pop,
5000         * (pct2): dump also stack usage for each function,
5001         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
5002         * (pic16_allocDirReg): various modifications,
5003         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
5004         fixed to 1,
5005
5006 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
5007
5008         * src/pic16/pcode.c: removed buggy double colon
5009
5010 2004-07-01 Borut Razem <borut.razem AT siol.net>
5011
5012         * support/scripts/sdcc.nsi: added include/pic16 to setup
5013
5014 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
5015
5016         * device/lib/Makefile.in: fixed bug in target objects-pic16,
5017         * device/lib/pic16/Makefile: prefixed with dash (-) command under
5018         target 'clean',
5019         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
5020         specific command line arguments. Also added sample lkr script
5021         for placing a variable at a specific memory bank.
5022         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
5023         at a specific memory bank,
5024         * (pic16_dump_isection): fixed bug which caused string literals to
5025         be omitted when dumping idata section,
5026         * (pic16_groupRegistersInSection): added code to handle registers
5027         in specific memory banks,
5028         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
5029         public, all references are renamed too,
5030         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
5031         AOP_DPTR2,
5032         * (pic16_storeForReturn): added case to handle when dest is WREG,
5033         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
5034         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
5035         pic16_rel_udata, check to see if that register is marked as being
5036         a member of a specific memory bank,
5037         * (pic16_printIvalCharPtr): added code to add string literals either
5038         to code or the idata sections,
5039         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
5040         also accept the 'udata' pragma,
5041         * src/pic16/main.h: new structure types sectName and sectSym
5042         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
5043         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
5044         * (pic16_findPrevInstruction): fixed, it returned nothing,
5045         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
5046         instruction combinations,
5047         * (pic16_FixRegisterBanking): heavily reorganised,
5048         * (pic16_AnalyzeBanking): if generating banksel directives is
5049         disabled, then don't call FixRegisterBanking at all,
5050         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5051         completely removed,
5052         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5053
5054 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5055
5056         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5057         Phuah Yee Keat <yk.phuah AT nestac.com>
5058
5059 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5060
5061         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5062         correctly the IVT even if it is relocated to some other location
5063
5064 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5065
5066         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5067         * device/include/pic16/pic18f2220.h: NEW,
5068         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5069         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5070         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5071         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5072         nodefaultlibs, ivt_loc is the location of the interrupt vector
5073         table, and nodefaultlibs signs that default libraries should not be
5074         linked in link stage,
5075         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5076         according to --ivt-loc argument,
5077         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5078         when pragma stack is found,
5079
5080 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5081
5082         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5083         256 (range check), 257 (do while), 258.a-f (bit banging
5084         f.e. on 3-wire SPI bus)
5085
5086 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5087
5088         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5089         variables used exclusively within a loop
5090
5091 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5092
5093         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5094
5095 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5096
5097         * src/SDCClrange.c (computeClash): fixed bug #971834
5098
5099 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5100
5101         * src/mcs51/gen.c (genCmp): fixed bug #975903
5102         * src/hc08/gen.c (operandsEqu),
5103         * src/ds390/gen.c (operandsEqu),
5104         * src/z80/gen.c (operandsEqu),
5105         * src/pic/gen.c (operandsEqu),
5106         * src/pic16/gen.c (operandsEqu),
5107         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5108         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5109
5110 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5111
5112         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5113
5114 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5115
5116         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5117         default case in switch statement,
5118         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5119         to eliminate problem with initialisation of pointers, but problem
5120         still exists,
5121         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5122         * (emitStaticSegment): removed various lines emitting debug info,
5123         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5124         added processor registers for utilizing EEPROM,
5125         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5126         configurable and set 8
5127
5128 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5129
5130         * .version: increased version number to 2.4.2,
5131
5132         Cumulative patch for pic16 port
5133         * src/pic16/device.c: changed scheme to dump initial values for
5134         variables in idata segment, all print_idata* functions were removed,
5135         now the pic16_printIval* will be called,
5136         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5137         * _pic16_printPointerType, pic16_printPointerType,
5138         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5139         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5140         NEW, similar to the respective functions in SDCCglue.c,
5141         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5142         way, emitting hex bytes,
5143         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5144
5145 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5146
5147         * src/avr/ralloc.c (serialRegAssign),
5148         * src/xa51/ralloc.c (serialRegAssign),
5149         * src/pic/ralloc.c (serialRegAssign),
5150         * src/pic16/ralloc.c (serialRegAssign),
5151         * src/hc08/ralloc.c (serialRegAssign),
5152         * src/z80/ralloc.c (serialRegAssign),
5153         * src/ds390/ralloc.c (serialRegAssign),
5154         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5155
5156 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5157
5158         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5159         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5160
5161 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5162
5163         Cumulative patch for pic16 port:
5164         * src/pic16/device.h (typedef PIC16_device) modified fields for
5165         defining microcontrollers,
5166         * src/pic16/device.c: added new info for all devices in Pics16 array,
5167         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5168         to be optimised out by the pCode optimiser,
5169         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5170         specially, bug reported by G.M. Gallant,
5171         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5172         as force'd so that cannot be optimised out by pCode optimiser,
5173         * src/pic16/pcode.c,
5174         * src/pic16/pcodepeeph.c,
5175         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5176         they are disabled by default, but can be enabled explicit with
5177         command argument --denable-peeps, for testing,
5178         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5179         --pomit-ivt in COMPILE_FLAGS
5180
5181 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5182
5183         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5184           compilation on MSVC
5185
5186 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5187
5188         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5189
5190 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5191
5192         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5193         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5194
5195 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5196
5197         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5198         would only assign 0x300001 register.
5199
5200 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5201
5202         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5203         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5204
5205 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5206
5207         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5208         for ds80c400
5209         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5210         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5211         added peephole 254 (left shift), 255 (jump table)
5212
5213 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5214
5215         * device/lib/Makefile.in: removed comment line with model-pic16,
5216         * (target port-specific-objects-pic16): the libraries and objects
5217         are copied to the build directory form the device/lib/pic16/bin
5218         directory
5219
5220         Cumulative patch concerning pic16 port:
5221         * library directory has been re-organized,
5222         * added support for PIC18F1220,
5223         * added headers and library sources for chips 18f1220,18f6520,
5224         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5225
5226         * configuration registers setting has changed, now each supported
5227         device has a complete description of the registers it uses,
5228         * all initialisations are moved to idata sections, these section
5229         can be absolute or relocatable,
5230         * fixed initialisation of codespace variables,
5231         * fixed warning about PCLATU and gpsim,
5232         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5233         * (genAssign): use table reads when assigning from variables in codespace,
5234         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5235         char/int variables placed in codespace,
5236         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5237         registers set in .asm file, no need for --pomit-config-words anymore,
5238         * (pic16glue): some 8051 legacy segments are commented out
5239         (to be removed completely),
5240         * added support for alternative assembler and linker with --asm=
5241         and --link= command line arguments,
5242         * peepholes are disabled automatically in the port, no need to
5243         specify on command line,
5244         * port supports natively char/int/long multiplication, but converts
5245         all divisions to support functions,
5246         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5247         to the file set in variable $2,
5248         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5249         strings in ASCII format and not in hex,
5250         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5251         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5252         allocate proper register if iCodes aren't temporary,
5253
5254 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5255
5256         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5257
5258 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5259
5260         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5261         is commented out
5262
5263 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5264
5265         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5266         computed address is reused
5267         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5268         multi-byte bitfields
5269
5270 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5271
5272         * src/z80/gen.c: (genArrayInit): must check for pointers too
5273
5274 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5275
5276         * support/regression/tests/zeropad.c: never meant to commit the
5277           nestedstruct test: removed, added check for GCC version
5278
5279 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5280
5281         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5282         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5283         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5284           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5285           bugs 928906 and 954082 half-empty initializers
5286         * src/SDCCsymt.h,
5287         * src/SDCCsymt.c (getAllocSize): added for above fix
5288         * src/z80/gen.c (genArrayInit): fixed bug 741044
5289         * support/regression/tests/zeropad.c: added tests
5290
5291 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5292
5293         * src/pic16/device.c (pic16_dump_section): corrected bug which
5294         caused some symbols of the libraries to be misplaced
5295
5296 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5297
5298         * src/pic16/glue.c,
5299         * src/pic16/ralloc.h,
5300         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5301         to fix conflict with pic port
5302
5303 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5304
5305         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5306         externs configuration variables,
5307         * src/pic16/ralloc.h,
5308         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5309         prototype in header, commented out some debug messages
5310
5311 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5312
5313         * src/pic16/glue.c,
5314         * src/pic16/main.c,
5315         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5316         for gpasm COFF object generation. Thanks to D. Hawkins for
5317         his patch info
5318
5319 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5320
5321         * src/ds390/main.c,
5322         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5323         Brock for spotting this)
5324         * src/ds390/gen.c (genEndFunction),
5325         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5326         interrupt handler and critical. Disable push/pop optimizations when
5327         peephole optimizations disabled.
5328
5329 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5330
5331         Updated pic16 library sources and headers.
5332         * device/lib/pic16/pic18f*/ ,
5333         * device/include/pic16/*.h: modified to handle structured SFR
5334         definitions
5335
5336 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5337
5338         * src/port.h (PORT structure): added hook initPaths, now each
5339         port can declare its own default search paths,
5340         which can been seen with the --print-search-dirs option,
5341         see pic16 port for example,
5342         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5343         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5344         * (doPrintSearchDirs): NEW, replaces in a central manner the
5345         printing of search dirs which was split in set*Paths functions,
5346         * (main): added call to port->initPaths and doPrintSearchDirs,
5347         * src/avr/main.c,
5348         * src/ds390/main.c,
5349         * src/hc08/main.c,
5350         * src/izt/i186.c,
5351         * src/izt/tlcs900h.c,
5352         * src/mcs51/main.c,
5353         * src/pic/main.c,
5354         * src/pic16/main.c: modified port structures to reflect addition of
5355         initPaths hook,
5356
5357         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5358         * (pic16_dump_section): for registers in same address reserve memory once,
5359         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5360         to no_banksel,
5361         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5362         result is greater in size than right or left,
5363         * (pic16_genUMult8X8_8): there are some cases where the result can
5364         be 16 bits size, so handle these,
5365         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5366         * (pic16_outBitC): modified to emit pcodes,
5367         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5368         or not,
5369         * (genDivOneByte): implemented algorithm to divide 8-bits,
5370         * (genCmp): uncommented goto, but issues still exist,
5371         * (genAnd): fixed a bug with variables >8bits,
5372         * (genPackBits): optimization added that uses BCF/BSF to change a
5373         single bit,
5374         * (genAssign): fixed bug when assigning floating point literals,
5375         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5376         __sdcc_gsinit_startup label,
5377         * src/pic16/main.c (_pic16_init): removed search directory
5378         initialisations,
5379         * (_pic16_initPaths): NEW, used to initialise search directories,
5380         * (_hasNativeMulFor): support functions for all except char/int
5381         multiplication, and char division,
5382         * (PIC16_port struct): modified entry for native mul support,
5383         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5384         no_banksel option,
5385         * (buildCallTree): call to register_usage is ifdef'ed out,
5386
5387 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5388
5389         * device/include/string.h: applied Stas Sergeev's patch to make this
5390         header file compatible with the preprocessor -Wundef option
5391         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5392         failure (fixes bug #941458)
5393
5394 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5395
5396         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5397         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5398         that the variable, not the function, should be static
5399         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5400         to be consistent with non-literal case
5401
5402 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5403
5404         * src/SDCCast.c (isConformingBody): fixed bug #949967
5405         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5406         convilong): fixed bug #952086
5407
5408 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5409
5410         * src/SDCCmem.c (allocVariables): fixed bug #955321
5411
5412 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5413
5414         * src/hc08/main.c (_hc08_genAssemblerEnd),
5415         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5416         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5417         completely eliminated the use of a temporary file
5418         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5419         when more than one file linked
5420         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5421
5422 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5423
5424         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5425         which fixes bug #543481
5426         * support/regression/tests/bug-751703.c: fixed comments left from a
5427         cut and paste error
5428         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5429         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5430         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5431         scopes
5432         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5433         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5434         are now changed to underscores in moduleName
5435
5436 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5437
5438         * as/mcs51/lkmem.c: better fix for bug #954173
5439
5440 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5441         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5442
5443         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5444         * device/include/c8051f000.h,
5445         * device/include/c8051f120.h,
5446         * device/include/c8051f300.h,
5447         * device/include/c8051f310.h,
5448         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5449         PWM16) and detab'ed
5450
5451 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5452
5453         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5454         and mailing lists, doc'ed --no-peep-comments, removed reference
5455         to knoppix (newest version has no LyX/LaTeX), other minor changes
5456         * src/SDCCglue.c (glue): save 2 bytes stack space with
5457         option --main-return. The ljmp could probably be avoided too
5458
5459 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5460
5461         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5462
5463 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5464
5465         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5466         * src/SDCCopt.c (isLocalWithoutDef),
5467         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5468         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5469         (credit to Maarten Brock for patch #949363, on which this is based)
5470         * support/regression/tests/bug-751703.c: some test cases of extern used
5471         within inner scopes.
5472
5473 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5474
5475         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5476         SPEC_STRUCT
5477         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5478         struct definitions
5479         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5480         dwWriteLabel): fix to create valid debugger symbols even when
5481         the module name has non-alphanumeric symbols in it
5482         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5483         when a variable's allocation has been optimized away
5484
5485
5486 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5487
5488         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5489         * src/hc08/main.c,
5490         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5491         * src/mcs51/main.c,
5492         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5493         * src/ds390/main.c,
5494         * src/z80/gen.c (z80_emitDebuggerSymbol),
5495         * src/z80/main.c,
5496         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5497         * src/pic/main.c,
5498         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5499         * src/pic16/main.c,
5500         * src/avr/gen.c (avr_emitDebuggerSymbol),
5501         * src/avr/main.c,
5502         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5503         * src/xa51/main.c,
5504         * src/SDCCdebug.c (emitDebuggerSymbol),
5505         * src/SDCCdebug.h,
5506         * src/port.h: added a debugger struct to the port struct. Added a
5507         callback for defining debugger symbols
5508
5509         * src/SDCCast.c (createLabel),
5510         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5511         with isitmp = 1
5512         * src/SDCCicode.h,
5513         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5514         iCode back to the ast for the function
5515
5516         * src/hc08/ralloc.c (hc08_assignRegisters),
5517         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5518         unneeded fields from the regs struct.
5519         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5520         pushReg() & pullReg() functions instead of emitcode()
5521
5522         * src/hc08/gen.c (genLabel, genhc08Code),
5523         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5524
5525         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5526         debugger hooks
5527
5528         * src/hc08/gen.c (genEndFunction, genhc08Code),
5529         * src/hc08/gen.h,
5530         * src/mcs51/gen.c (genEndFunction, gen51Code),
5531         * src/mcs51/gen.h,
5532         * src/ds390/gen.c (genEndFunction, gen390Code),
5533         * src/ds390/gen.h,
5534         * src/z80/gen.c (genEndFunction, genZ80Code),
5535         * src/z80/gen.h,
5536         * src/z80/z80.h,
5537         * src/pic/gen.c (genEndFunction, genpic14Code),
5538         * src/pic/gen.h,
5539         * src/pic16/gen.c (genEndFunction, genpic16Code),
5540         * src/pic16/gen.h,
5541         * src/avr/gen.c (genEndFunction, genAVRCode),
5542         * src/avr/gen.h,
5543         * src/xa51/gen.c (genEndFunction, genXA51Code),
5544         * src/xa51/gen.h,
5545         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5546         specific code to cdbFile.c and out of the backend code generators
5547
5548         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5549         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5550         starting address is now 0
5551
5552         * as/hc08/asm.h,
5553         * as/hc08/m08pst.c,
5554         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5555         assembler directive for DWARF support
5556         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5557
5558         * src/src.dsp,
5559         * src/Makefile.in,
5560         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5561
5562 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5563
5564         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5565         and inappropriate peephole optimization in jump tables
5566
5567 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5568
5569         * as/hc08/m08pst.c,
5570         * src/SDCCglue.c: sdccopt works for the hc08 port now
5571
5572 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5573
5574         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5575
5576 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5577
5578         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5579
5580 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5581
5582         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5583         rules
5584         * src/SDCCmain.c,
5585         * src/SDCCglobl.h,
5586         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5587         comments from the peephole optimizer replacement rules
5588         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5589         symbols
5590         * src/SDCCcse.c (updateSpillLocation),
5591         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5592         equivalents
5593         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5594         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5595         objects far pointers
5596
5597 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5598
5599         * src/SDCCsymt.h: a missing part of my last change
5600         * src/pic/ralloc.c (regTypeNum),
5601         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5602
5603 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5604
5605         * src/SDCCicode.h,
5606         * src/SDCCicode.c (aggrToPtrDclType),
5607         * src/SDCCptropt.h,
5608         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5609         ptrPseudoSymConvert),
5610         * src/pic/ralloc.c (regTypeNum),
5611         * src/pic16/ralloc.c (regTypeNum),
5612         * src/hc08/ralloc.c (regTypeNum),
5613         * src/ds390/ralloc.c (regTypeNum),
5614         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5615         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5616
5617 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5618
5619         * link/z80/lkmain.c (afile),
5620         * as/hc08/lkmain.c (afile),
5621         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5622         prevent a pointer problem when a filename has no directory and
5623         no extension specified.
5624
5625 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5626
5627         * link/z80/lkmain.c (afile): allow periods in directory names
5628         * link/z80/lkmain.c (afile),
5629         * as/mcs51/lkmain.c (afile),
5630         * as/hc08/lkmain.c (afile): allow linker script file to have an
5631         extension other than ".lnk"
5632         * link/z80/lklex.c (getfid),
5633         * link/z80/lkmain.c (parse),
5634         * as/mcs51/lklex.c (getfid),
5635         * as/mcs51/lkmain.c (parse),
5636         * as/hc08/lklex.c (getfid),
5637         * as/hc08/lkmain.c (parse): Support comments in the linker script
5638         file on lines by themselves and after filenames
5639
5640 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5641
5642         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5643
5644 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5645
5646         * src/z80/peeph-z80.def: removed some peephole rules that don't
5647         work with multibyte arithmetic (fixed bug #937126)
5648         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5649         to registers and not global variables
5650         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5651         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5652         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5653         checking for assignments not internally generated (fixed bug #931895)
5654         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5655         structure member (fixed bug #930072)
5656
5657 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5658
5659         * src/SDCCmain.c (linkEdit),
5660         * src/hc08/main.c (_hc08_parseOptions),
5661         * as/hc08/Makefile.in,
5662         * as/hc08/aslink.h,
5663         * as/hc08/asm.h,
5664         * as/hc08/m08pst.c,
5665         * as/hc08/lkrloc.c (relr, rele),
5666         * as/hc08/lkarea.c (lnkarea)
5667         * as/hc08/lkmain.c (afile, parse),
5668         * as/hc08/lkelf.c: support for ELF output
5669         * as/hc08/lks19.c (s19),
5670         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5671
5672 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5673
5674         * as/mcs51/lkihx.c: Fixed bug #899105.
5675
5676 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5677
5678         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5679         .dsp files from Unix to DOS.
5680
5681 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5682
5683         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5684         function pointers; we have been compliant for several months now.
5685         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5686         change that was accidently commented out
5687         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5688         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5689         bug #922319
5690
5691 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5692
5693         * src/hc08/gen.c: output of all of the internal debugging information
5694         is now controlled by the D() macro; it is disabled by default
5695
5696 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5697
5698         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5699         harder to keep the same registers during a CAST iCode
5700         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5701         long via int can be done in a single cast, if the signedness is
5702         correct.
5703         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5704         putchar() in tinibios.c in ds390's library
5705
5706 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5707
5708         * src/SDCCast.c (decorateType): fixed bug #898889,
5709         cast result of a literal complement too
5710         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5711         fixed check for bitfields
5712
5713 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5714
5715         * src/SDCCicode.c (geniCodeLogic): made it static,
5716         (geniCodeLogicAndOr): added in order to fix bug #905492,
5717         (ast2iCode): fixed bug #905492
5718         * support/regression/tests/bug-905492.c: added
5719         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5720         (processParms): fixed bug #927659: don't copy parms, this will clear
5721         decorated flag
5722         * support/regression/tests/bug-927659.c: added
5723
5724 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5725
5726         * src/SDCCast.c (addCast): don't cast float to char
5727         * device/lib/libsdcc.lib: added _memmove
5728
5729 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5730
5731         * device/lib/large/Makefile: fixed parallel execution by
5732         replacing `make` by `$(MAKE)`
5733
5734 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5735
5736         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5737         offsets (fixes bug #923936)
5738
5739 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5740
5741         * device/lib/small/Makefile: fixed parallel execution by
5742         replacing `make` by `$(MAKE)`
5743
5744 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5745
5746         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5747
5748 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5749
5750         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5751         * src/regression/Makefile: Regression test was not running.
5752
5753 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5754
5755         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5756         complement if possible
5757         * src/SDCCval.c (valComplement),
5758         * src/SDCCicode.c (operandOperation): fixed complement of literal
5759         * support/regression/tests/onebyte.c (testComplement): added
5760
5761 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5762
5763         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5764         return an optimized tree; actually replace actParm with the new tree
5765         * src/SDCCast.h: added some parantheses to remove side effects
5766         * support/regression/tests/bug-920866.c
5767
5768 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5769         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5770         Bit operands were not being handled properly in the pic14 port.
5771         (now src/regression/add.c passes again).
5772
5773 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5774
5775         * src/SDCC.y (labeled_statement): case and default no longer require
5776         a following statement (RFE #893037)
5777
5778 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5779
5780         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5781         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5782         disabled (fixes bug #916294)
5783         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5784         "mov a,acc"; patch provided by Lenny Story
5785         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5786
5787 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5788
5789         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5790         functions
5791         * src/ds390/gen.c (genFunction, genEndFunction),
5792         * src/ds390/ralloc.c (ds390_assignRegisters),
5793         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5794         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5795         pushed if there are parameters passed on the stack. Also, a cleaner
5796         way to decide if r0/r1 should be pushed/popped. (Together they fix
5797         bug #918693)
5798
5799 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5800
5801         * doc/sdccman.lyx,
5802         * device/lib/mcs51/crtpagesfr.asm,
5803         * device/lib/mcs51/crtxinit.asm,
5804         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5805         to avoid confusion with Si Lab's SFRPAGE register.
5806
5807 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5808
5809         * src/SDCCglue.c (emitMaps): allow public sfr variables
5810         * src/SDCCglue.c (initialComments): include compiler build date
5811         with compiler version and put the timestamp of the generated
5812         assembly file on a serperate line to be less confusing.
5813         * src/port.h: added genInitStartup hook
5814         * src/avr/main.c,
5815         * src/ds390/main.c,
5816         * src/hc08/main.c,
5817         * src/pic/main.c,
5818         * src/pic16/main.c,
5819         * src/xa51/main.c,
5820         * src/z80/main.c: genInitStartup initialize as NULL (default to
5821         historical behaviour)
5822         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5823         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5824         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5825         library instead of hard coding it into the compiler.
5826         * support/regression/ports/mcs51-stack-auto/spec.mk,
5827         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5828         * device/lib/mcs51/Makefile,
5829         * device/lib/small/Makefile,
5830         * device/lib/large/Makefile,
5831         * device/lib/mcs51/crtpagesfr.asm,
5832         * device/lib/mcs51/crtstart.asm,
5833         * device/lib/mcs51/crtxclear.asm,
5834         * device/lib/mcs51/crtxinit.asm,
5835         * device/lib/mcs51/crtclear.asm,
5836         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5837         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5838         and into user configurable files.
5839         * device/lib/clean.mk: clean mcs51 directory too
5840         * support/regression/tests/longlit.c: added static to T1 declaration
5841         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5842         accesses in the initialization code
5843
5844 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5845
5846         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5847         OSCTRIMVAL as noted in bug #916008
5848
5849 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5850
5851         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5852         in loops with multiple exits (reported as incorrect registers
5853         used by Martin Helmling in Sdcc-user list)
5854
5855 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5856
5857         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5858         made ds390 register extensions look less like error messages
5859
5860 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5861
5862         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5863         reported by Adam Wozniak in Sdcc-user list
5864
5865 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5866
5867         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5868         arithmetic optimizations, added debug output
5869
5870 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5871
5872         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5873         * sdcc.spec: updated and split sdcc into 3 rpms
5874         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5875         needed for literals of LEFT_OP and '+'
5876         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5877         introduced RESULT_TYPE_NOPROM
5878         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5879         left shift
5880         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5881         limited promotion to int only for '*'
5882         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5883
5884 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5885
5886         * src/pic16/gen.c (genSkip),
5887         (genc16bit2lit), (gencjneshort): commented out
5888         (is_LitOp): new helper function, checks operand type
5889         (genCmpEq): rewritten
5890
5891 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5892
5893         * support/regression/tests/bug-908454.c: added
5894
5895 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5896
5897         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5898         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5899         (geniCodeCast): cosmetic, don't preserve bit storage class
5900         (geniCodeLeftShift): added promotion
5901         (geniCodeLogic): fixed regression
5902         * src/SDCCsymt.c (computeTypeOr): accept bits too
5903         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5904
5905 2004-03-07  Borut Razem <borut.razem AT siol.net>
5906
5907         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5908
5909 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5910
5911         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5912         version of pic16_genPackRegisters which does not check if ic is a
5913         CAST operator,
5914         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5915         function cause string1.c regression test fails
5916
5917 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5918
5919         * sim/ucsim/configure.in,
5920         * sim/ucsim/configure,
5921         * sim/ucsim/doc/Makefile.in: use docdir
5922         * src/SDCC.y: fixed sbit atrributes
5923         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5924         * src/SDCCast.c (decorateType): |^& need special promotion handling
5925         * src/SDCCast.h,
5926         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5927         * src/SDCCsymt.h (computeType),
5928         * src/SDCCicode.c: computeType() needs op
5929         * src/SDCCsymt.c (checkTypeSanity),
5930         * doc/sddman.lyx: "plain" bitfields are unsigned
5931         * src/SDCCsymt.c (computeTypeOr): added
5932         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5933         |^& ops
5934         * src/SDCCval.c (val*): computeType() needs op
5935         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5936         * support/regression/tests/onebyte.c: added tests for |^&
5937
5938 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5939
5940         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5941         for writing icode into asm output.
5942
5943 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5944
5945         * src/pic16/device.c: added some debug lines enabled
5946         with macro DEBUG_CHECK,
5947         * src/pic16/genarith.c: more debug in genPlus,
5948         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5949         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5950         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5951         * (aopForSym): onStack symbols are re-placed in data memspace,
5952         and onStack flag is cleared,
5953         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5954         copy temporary pcodeop,
5955         * (genPcall): added warning for not updating PCLATU,
5956         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5957         always true for pic16 port,
5958         * (genMultOneWord): NEW, supports integer multiplication,
5959         * (genMult): modified to call genMultOneWord,
5960         * (ifxForOp): added warning when return NULL,
5961         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5962         flag is set before call to operandFromSymbol for implicit
5963         added structures,
5964         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5965         options.intlong_rent are set by default,
5966         * (_hasNativeMulFor): modified to allow port generation of integer
5967         multiplication,
5968         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5969         set regtype to REG_SFR for all registers, restricting seting the
5970         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5971
5972 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5973
5974         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5975         more than 500 times in the regression tests
5976
5977 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5978
5979         * support/Util/SDCCerr.h,
5980         * support/Util/SDCCerr.c,
5981         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5982         enumerator_list),
5983         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5984         for symbol conflicts.
5985         * support/valdiags/tests/enum.c,
5986         * support/valdiags/tests/tentdecl.c,
5987         * support/valdiags/tests/struct.c: expect possible error messages
5988         referring to original symbol definitions.
5989         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5990         * src/SDCCsymt.h,
5991         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5992
5993 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5994
5995         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5996
5997 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5998
5999         * src/pic16/ralloc.c (newReg): fixed bug #908929
6000
6001 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6002
6003         * src/ds390/gen.c: added missing #include "main.h"
6004
6005 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
6006
6007         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
6008         checking if symbol is already in set,
6009         * src/pic16/device.h: prototype for checkAddSym,
6010         * src/pic16/gen.c: (_G): added entry interruptvector,
6011         * (assignResultValue): removed some commented out lines,
6012         * (genFunction): check for ISR via sym->type, absolute section for
6013         interrupt code is created via a new pBlock, the goto instruction is
6014         placed now correctly at the interrupt vector position, changed all
6015         references from ivec to _G.interruptvector,
6016         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
6017         is the interrupt is a high priority one, same for return from ISR,
6018         * src/pic16/glue.c: changed all calls of addSetHead for publics and
6019         externs to calls of checkAddSym,
6020         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
6021         pic16_pcode_verbose flag is set,
6022         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
6023         * src/pic16/pcoderegs.c: message about how many registers are saved
6024         will only be emitted if pic16_pcode_verbose flag is set,
6025
6026 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6027
6028         * src/ds390/ralloc.h,
6029         * src/ds390/ralloc.c (ds390_regWithIdx),
6030         * src/ds390/gen.c (emitcode),
6031         * src/ds390/main.h,
6032         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
6033         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6034         ds390operandCompare, getRegsRead, getRegsWritten,
6035         initializeAsmLineNode): customized instruction size calculation for
6036         ds390, started basis for some register optimizations
6037         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
6038         corresponding assembly output
6039         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
6040         missing push/pop of r0/r1. Optimized push/pops
6041
6042 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6043
6044         * src/mcs51/main.c (instructionSize): fixed ACALL size
6045         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
6046
6047 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6048
6049         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6050         the sorting of rlist with NULL elements
6051         * (print_idataType, print_idata): NEW to create idata sections
6052         * src/pic16/device.h: idataSymSet new variable
6053         * src/pic16/gen.c (genFunction): fixed some bugs in string
6054         comparing, improved the absolute section creation for ISRs,
6055         added FSR0L/FSR0H in registers that are saved in an ISR,
6056         * (genInline): fixed the processing of inline snippets,
6057         now they undergo no process by the peephole optimizer
6058         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6059         are placed in idataSymSet,
6060         * (pic16emitStaticSeg): extern symbols are added in externs,
6061         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6062         switching when aboslute variables are placed in access bank memory
6063         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6064         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6065         commented out with #if,
6066         * (pic16_packRegisters): reintroduce the check for CAST because some
6067         symbols are not correctly handled,
6068         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6069         pCodeInstruction instead of pCode,
6070         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6071         pCodeAsmDir definition,
6072         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6073         directive, then the argument directive is emitted without the leading
6074         tab, hack for inline labels which must be in the first column,
6075         * (compareLabel,pic16_findNextInstruction),
6076         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6077         * (insertBankSwitch): modified for the new pCodeAsmDir,
6078
6079 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6080         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6081
6082         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6083         instance,
6084         * (pushSide): commented out with #if,
6085         * (assignResultValue): fixed some typos in saving
6086         registers,
6087         * (genPcall): FIXED and sync'ed with genCall,
6088         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6089         * (genNearPointerGet): fixed to handle some more cases,
6090         implementation scheme via table reads,
6091         * (genConstPointerGet): modified to access code memory correct,
6092         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6093         and improved to handle some cases
6094         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6095         instead of "RETLW" for init data
6096         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6097         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6098         variables are placed in access bank memory (<0x80 and >=0xf80),
6099         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6100         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6101         TBLWT_POSTDEC,TBLWT_PREINC
6102         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6103         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6104         directives
6105         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6106         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6107         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6108         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6109
6110 2004-02-29  Borut Razem <borut.razem AT siol.net>
6111
6112         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6113         support/Util/findme.h, support/Util/system.h: enhance binary relative
6114         search for lib and include by using findProgramPath()
6115
6116 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6117
6118         * src/SDCCpeeph.h,
6119         * src/SDCCpeeph.c (pcDistance),
6120         * src/port.h,
6121         * src/mcs51/ralloc.h,
6122         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6123         * src/mcs51/main.h,
6124         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6125         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6126         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6127         size calculation port specific, started basis for some register
6128         optimizations
6129         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6130         missing push/pop of r0/r1. Optimized push/pops
6131         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6132         * device/lib/_modsint.c (_modsint),
6133         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6134         and stack version so regression tests pass
6135
6136 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6137
6138         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6139         * src/SDCCast.c (decorateType): catch another small optimization
6140         with '?' operator
6141         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6142         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6143         modified to finally use computeType() all over SDCC,
6144         see Feature Request #877103
6145         * src/SDCCval.h: cosmetic
6146         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6147         valCompare(); regression tested in muldiv.c
6148         * support/regression/tests/muldiv.c (testMod): mod sign follows
6149         dividend only
6150
6151 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6152
6153         * src/SDCCast.c (decorateType): fixed bug #902362
6154         * doc/INSTALL.txt: fixed install instructions for win32
6155
6156 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6157
6158         * device/include/Makefile.in (install): fixed by replacing spaces
6159         by tabs
6160         * doc/README.txt,
6161         * doc/INSTALL.txt: updated for release
6162         * doc/sdccman.lyx: added warning for --xstack being buggy
6163
6164 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6165
6166         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6167         to eliminate build warnings.
6168         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6169
6170 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6171            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6172
6173         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6174         removed -penable-stack, added comment for stack pragma, added
6175         warning for not initializing the stack/frame registers, removed
6176         comment at interrupts section
6177
6178         Stack is made permanent, there is no ability to disable stack usage.
6179         * src/pic16/device.h,
6180         * src/pic16/device.c: removed all references to USE_STACK macro,
6181         * src/pic16/device.c (pic16_dump_section): when no elements in
6182         rlist, free rlist before return,
6183         * (pic16_dump_int_registers): NEW, internal registers are a new set
6184         of general purpose registers reused by each function,
6185         * (checkAddReg): returns 1 if registers is added to set,
6186         * (pic16_groupRegistersInSection): when a registers is of type
6187         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6188         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6189         SRCASECMP macro is moved here from device.c
6190         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6191         PO_PCLATU, PO_PRODL, PO_PRODH,
6192         * (pic16_pCodeOpType, genMinus,
6193         changed compares to "a" register, with AOP_ACC,
6194         * (pic16_genPlus): fixed some bugs and indented properly,
6195         * (pic16_addSign): changed size to size+offset in the MOVWF
6196         instruction,
6197         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6198         multiply 8-bit operand by literal, result is 8-bit,
6199         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6200         multiply 2 8-bit operand, result is 8-bit,
6201         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6202         genUMult8X*_16,
6203         * src/pic16/gen.c: changed accUse to contain WREG only,
6204         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6205         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6206         true, do not use immediate addressing any more unless sym is a
6207         pointer in codespace,
6208         * (aopForRemat): do not use immediate addressing when symbol not in
6209         codespace and when symbol's address is requested,
6210         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6211         accUse size (= 1),
6212         * (aopGet): added case for AOP_ACC and don't return "accumulator
6213         bug" but WREG instead,
6214         * (popGetTempReg): pushes contents of temporary register in stack,
6215         * (popReleaseTempReg): pops contents of temporary register from
6216         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6217         * (pic16_popGet): separated case AOP_ACC to return register WREG
6218         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6219         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6220         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6221         the use of immediate pointers to certain cases only.
6222
6223         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6224         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6225         * (assignResultValue, genCall, genRet): modified to use the new
6226         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6227         genPcall is still broken,
6228         * (genFunction): added code to create 'A' type pBlocks when
6229         interrupt functions are generated, code not extensively tested yet,
6230         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6231         * (genEndFunction): modified so ISRs pop stored registers from stack,
6232         * (genMultOneByte): cleanup,
6233         * (AccRsh): added flag andmask, to and result with appropriate mask,
6234         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6235         * (genDataPointerGet): fixed and reenabled its use,
6236         * (genNearDataPointerGet): bugs fixed,
6237         * (genDataPointerSet): bugs fixed,
6238         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6239         pic16_DumpSymbol, pic16_DumpOp,
6240         * src/pic16/genutils.h: function prototypes for the above functions,
6241         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6242         pointers,
6243         * (pic16emitRegularMap): many many many improvements, but needs a
6244         major cleanup,
6245         * src/pic16/main.c: enable_stack in pic16_options is removed,
6246         * (_pic16_parseOptions): removed command line options -penable-stack,
6247         * (_process_pragma): emit stack symbol only when stack pragma is
6248         processed,
6249         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6250         redirected to FSR0L/FSR0H pair,
6251         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6252         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6253         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6254         for immediates,
6255         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6256         * (dumpPicOptype): NEW,
6257         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6258         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6259         with movff instruction,
6260         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6261         added pic16_int_regs, some packRegsFor* functions are commented out,
6262         because produce errors,
6263         * src/pic16/NOTES: minor modifications
6264
6265 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6266
6267         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6268         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6269         --pack-iram.
6270         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6271         * as/mcs51/lkaomf51.c: fixed bug #895763
6272
6273 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6274
6275         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6276
6277 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6278
6279         * doc/sdccman.lyx: added details about the HC08 storage classes and
6280         interrupts, fixed the register usage info for z80 & gbz80
6281
6282 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6283
6284         * doc/sdccman.lyx: added more pic16 port documentation
6285         * device/include/pic16/: added header pic18fregs.h
6286
6287 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6288
6289         * doc/sdccman.lyx: added Vangelis' contribution
6290
6291 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6292
6293         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6294         extend to the next CALL or PCALL, not just to the next CALL.
6295
6296 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6297
6298         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6299
6300 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6301
6302         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6303         bug #895752 and a better fix for bug #716790
6304
6305 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6306
6307         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6308
6309 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6310
6311         * doc/sdccman.lyx: minor changes, minor changed
6312
6313 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6314
6315         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6316         which can't handle SDCC_NEWONEBYTEOPS,
6317         (geniCodeMultiply): removed conversion from mult to shift for pic14
6318         and pic16
6319
6320 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6321
6322         * src/hc08/gen.h,
6323         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6324         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6325         thus fixing bug #895406
6326
6327 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6328
6329         * device/lib/_modsint.c,
6330         * device/lib/_modslong.c: sign follows divisor only
6331         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6332         signs or signedness can be ignored
6333         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6334         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6335         added optimization for IFX,
6336         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6337         arguments;
6338         reenabled optimization for IFX, which was removed on 2004-01-11
6339         * src/SDCCast.h: added return type IFX
6340         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6341         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6342         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6343         SDCC_OLDONEBYTEOPS selects the old behaviour
6344         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6345         changed again and commented promotion rule
6346         * src/SDCCval.c (valDiv): promotion no longer necessary
6347         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6348         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6349         rewritten
6350         * support/regression/tests/onebyte.c: added
6351
6352 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6353
6354         * gen.c (genInline): reverted to old code for assemnling inline
6355         code because of bug reported James Chadd
6356
6357 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6358
6359         * ralloc.h: missing declarations from previous patch,
6360         seems that patch for ralloc.h was never applied, fixed
6361
6362 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6363            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6364
6365         * pcode.c,
6366         * pcode.h,
6367         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6368         indirect addressing. Marked FSR0 as deprecated
6369         * gen.c (pointerCode): commented out, not needed now
6370         (pic16_popGet2p): new MOVFF helper function
6371         (genGenPointerGet),
6372         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6373         (shiftRLong): removed duplicate debugging info
6374
6375 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6376
6377         * src/ds390/gen.c (genNearPointerGet),
6378         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6379         optimization with bits, but not bitfields.
6380         * src/ds390/ralloc.c (packRegisters),
6381         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6382
6383 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6384
6385         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6386
6387 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6388
6389         * src/SDCCsymt.h,
6390         * src/SDCCicode.c (operandFromSymbol),
6391         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6392         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6393         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6394         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6395         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6396         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6397         bug #892038
6398         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6399         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6400         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6401         * src/SDCCsymt.c (newSymbol),
6402         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6403         enumerator_list),
6404         * src/SDCCval.h,
6405         * src/SDCCval.c (newiList): fixed bug #885705
6406
6407 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6408
6409         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6410         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6411
6412 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6413
6414         * device/include/c8051f120.h,
6415         * device/include/c8051f300.h,
6416         * device/include/c8051f310.h: added/updated header files for Silicon
6417         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6418         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6419         in new section Submitting patches
6420
6421 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6422
6423         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6424         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6425         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6426         genGenPointerSet),
6427         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6428         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6429         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6430         genGenPointerSet),
6431         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6432         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6433         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6434         genGenPointerSet),
6435         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6436         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6437         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6438         genGenPointerSet): fixed bug #892400
6439         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6440         to eliminate build warnings.
6441         * src/SDCCast.c (processParms),
6442         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6443         fixed bug 751859
6444         * support/valdiag/valdiag.py: added GCC to the list of defines active
6445         when compiling with gcc
6446
6447 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6448
6449         * support/Util/SDCCerr.h,
6450         * support/Util/SDCCerr.c,
6451         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6452         with an incomplete type (fixed bug #883734)
6453         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6454
6455 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6456
6457         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6458
6459 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6460
6461         * src/SDCCast.c (decorateType),
6462         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6463         function pointer implementation
6464         * support/regression/tests/funptrs.c: added tests to verify both forms
6465         of function pointers work correctly. Added tests to verify parameters
6466         are passed in the correct order.
6467
6468 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6469
6470         * device.c (regCompare): registers are sorted by ascending
6471         address and increasing size,
6472         * main.c (_pic16_finaliseOptions): removed the declaration
6473         of compiler macro MCU. Now a macro of the format pic18fxxxx
6474         will be defined from the command line
6475
6476 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6477             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6478
6479         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6480         PCOP_RLCF was overwritten!
6481         * gen.c (genSkip): commented out calls to pic16_emitcode,
6482         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6483         * (genlshTwo),
6484         * (genRRC): added debugging info,
6485         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6486         overwritten while shifting,
6487         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6488         overwritten while shifting,
6489         * (AccLsh),
6490         * (AccRsh),
6491         * (shiftLLeftOrResult),
6492         * (shiftRLeftOrResult),
6493         * (shiftRLong),
6494         * (shiftLLong): Implemented with pic16_emitpcode
6495         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6496         * (genLeftShift): Fixed bug, operand for shift by variable always
6497         was "and"ed with 0x0f,
6498         * (genLeftShiftLiteral),
6499         * (genrshTwo),
6500         * (genRightShiftLiteral): added debugging info,
6501         * (genrshFour): added comment,
6502         * (genRightShift): determined signedness from operand "left"
6503         instead of "result"
6504
6505 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6506
6507         * src/SDCCicode.c (geniCodeParms),
6508         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6509         function pointers, fixed function pointer bugs #861242 and #861896
6510
6511 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6512
6513         * device/include/c8051f000.h,
6514         * device/include/c8051f120.h,
6515         * device/include/c8051f300.h: added header files for Silicon
6516         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6517
6518 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6519
6520         * src/SDCCast.c (processParams): added new type flow and restructured
6521         (gatherAutoInit): added new type flow
6522         (addCast): cosmetic changes
6523         (getLeftResultType): added new type flow for array indices, patch
6524         provided by Stas, see FR #877103
6525         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6526         array index patch by Stas
6527         * src/SDCCast.h: added prototype getResultTypeFromType()
6528         * src/SDCCval.h,
6529         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6530         * src/pic/glue.c (pic14emitStaticSeg),
6531         * src/pic16/glue.c (pic16emitStaticSeg),
6532         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6533         for initialization of symbols
6534         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6535         * support/Util/SDCCerr.h:
6536         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6537         * .version: bumped version number to 2.3.8
6538         * device/include/Makefile.in (install),
6539         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6540         avoid warnings
6541
6542 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6543
6544         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6545         Slade Rich fixed an optimization bug
6546         * src/pic/pcodepeep.c,
6547         * src/pic/pcoderegs.c
6548         * doc/Makefile (install): added test for directory
6549
6550 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6551
6552         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6553         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6554         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6555         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6556         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6557         * as/mcs51/asexpr.c (term),
6558         * as/hc08/asexpr.c (term): fixed bug #887146
6559
6560 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6561
6562         * src/z80/gen.c (genMult): handle single byte result product
6563         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6564         DUMMY_READ_VOLATILE (fixed bug #886367)
6565
6566 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6567
6568         * support/regression/tests/libmullong.c: fixed logic, on little endian
6569         hosts we ended without a mullong_wrapper()
6570
6571 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6572
6573         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6574         virus/worm forged address usage.
6575
6576 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6577
6578         Fixed promotion, it should be done on AST level:
6579         * src/SDCCast.c (addCast): added promotion to int
6580         (decorateType): updated call to upCast()
6581         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6582         usualUnaryConversions()
6583
6584 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6585
6586         * support/regression/tests/literalop.c (mulWrapper): Added a
6587         wrapper to remove integer overflow warnings.
6588
6589         * support/regression/tests/float_trans.c: Made work on host.
6590
6591         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6592         location of sz80.
6593
6594         * support/regression/generate-cases.py (main): Changed from inline
6595         to a main method.
6596
6597         * doc/Makefile (install): Changed to depth first to get rid of
6598         missing directory install warning.
6599
6600         * as/Makefile (install-doc): Made work on Mac.
6601
6602 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6603
6604         * src/SDCCast.c: added an additional type flow in decorateType() of
6605         opposite direction, see feature request #860006; it's enabled at runtime
6606         by setting the environment variable SDCC_NEWTYPEFLOW
6607         * src/SDCCast.h: changed prototype of decorateType()
6608         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6609         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6610         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6611         see feature request #877103
6612         * src/SDCCval.c: updated call of decorateType()
6613         (valBitwise): fixed bug #882876
6614         (valMinus): added promotion
6615         (valLogicAndOr): result is unsigned
6616         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6617         * src/SDCCsymt.c (computeType),
6618         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6619         must not cause an unsigned operation
6620         * src/pic/glue (pic14emitRegularMap),
6621         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6622
6623 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6624
6625         * src/pic/pcode.c (PCodeID): commented out left over debug code
6626
6627 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6628
6629         * support/valdiag/tests/overflow.c: added shift tests
6630         * src/pic/device.c,
6631         * src/pic/gen.c,
6632         * src/pic/gen.h,
6633         * src/pic/glue.c,
6634         * src/pic/main.c,
6635         * src/pic/pcode.c,
6636         * src/pic/pcode.h,
6637         * src/pic/pcodepeep.c,
6638         * src/pic/pcoderegs.c,
6639         * src/pic/ralloc.c,
6640         * src/pic/ralloc.h: applied patch from Slade Rich;
6641         added support for multiple code pages and multiple RAM banks on the
6642         PIC 14 port. The ASM files now no longer simply assume all the
6643         code / RAM are in the same page / bank. This means the linker can
6644         safely allocate code/RAM of separate ASM files to different pages/banks.
6645         * doc/sdccman.lyx: added Slade's tips
6646         * src/mcs51/peeph.def: fixed bug #880768
6647
6648 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6649
6650         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6651         * src/SDCCast.c (decorateType): fixed bug #880197
6652
6653 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6654
6655         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6656         getopt.h.
6657
6658         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6659         strtof is not part of C89 and isn't included with Mac OS X.
6660
6661 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6662
6663         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6664         shiftL2Left2Result): fixed bug #879326
6665         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6666         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6667         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6668         address fetch for clr instruction
6669         * device/lib/hc08/_mulint.c: created optimized assembly version
6670         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6671
6672 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6673
6674         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6675         proposed in FR #877103
6676
6677 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6678
6679         * src/SDCCval.c (cheapestVal): added missing checks
6680         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6681         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6682
6683 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6684
6685         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6686         equal operands
6687
6688 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6689
6690         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6691         loaded with the linker search paths (-L arguments) and the libraries
6692         to be linked with the current source (-l arguments). Changes
6693         currently will affect only the pic16 port.
6694         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6695         include path the port specific paths and port specific libraries,
6696         * gplink command now contains the $3 argument,
6697         * src/pic16/device.h,
6698         * src/pic16/device.c,: structure PIC_device is made public and
6699         renamed to PIC16_device, the same for variable Pics which is renamed
6700         to Pics16. Updated all references to them.
6701         * src/pic16/glue.c (pic16glue): corrected bug with code
6702         initialization which bypassed the variable initializations block.
6703
6704         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6705         COMPILE_FLAGS and added the --nostdinc option
6706
6707 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6708
6709         * device/include/mc68hc908jb8.h: Register defs for another member
6710         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6711
6712 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6713
6714         Documenting changes from previous commits.
6715         * configure.in (version 1.56),
6716         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6717         when generating output files to configure the pic16 library,
6718         but now I've commented it out, since gputils aren't installed in the
6719         SF compile farm, so library won't compile
6720
6721         * device/lib/Makefile.in (version 1.56): initially I've added in
6722         target 'all' the prerequestive 'model-pic16' so it compiled the
6723         pic16 library, but now I've commented it out for the same reasons
6724         above,
6725         * added targets 'model-pic16' and 'objects-pic16' to compile the
6726         library
6727         * added target 'port-specific-objects-pic16' to handle the
6728         generated libraries and copy them into the build/ directory
6729         * added target 'clean-intermediate-pic16' to clean intermediate
6730         files into pic16 directory
6731         * in target 'installdirs' added line to create directory pic16 in
6732         the installation path
6733
6734         * device/include/Makefile.in (version 1.11): in target 'install'
6735         added lines to copy all header files to installation path,
6736         * in target 'installdirs' added line create directory for pic16
6737         headers in the installation path
6738
6739 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6740
6741         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6742          a function call
6743
6744 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6745
6746         * configure,
6747         * device/lib/configure.in,
6748         * device/lib/configure: fixed for autoconf 2.57
6749
6750 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6751
6752         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6753         option so that it actually works. Made it specific to the z80, since
6754         the gbz80 doesn't have these kinds of I/O ports.
6755
6756 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6757
6758         * device/include/z180.h,
6759         * device/lib/_memcpy.c,
6760         * device/lib/_memmove.c,
6761         * device/lib/_mulint.c,
6762         * device/lib/ser_ir.c,
6763         * device/lib/ser_ir_cts_rts.c,
6764         * device/lib/_strcmp.c,
6765         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6766         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6767         portmode; added deprecation warning for bank= and protmode= forms.
6768         Also, guard against buffer overflow.
6769         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6770
6771 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6772
6773         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6774         changed interrupt vector table generation to only emit declared vectors.
6775         * device/include/Makefile.in: added missing backslash
6776         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6777
6778 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6779
6780         Mainly changes to support compilation of the device libraries
6781         * src/pic16/device.c: stack is allocated via symbol and not
6782         via literal number. The symbol is placed in the corresponding
6783         position of the data ram
6784         * (pic16_dump_section): relocatable and absolute uninitialized
6785         data are now emitted in sorted order to reduce section naming,
6786         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6787         weren't marked as being in the access bank,
6788
6789 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6790
6791         Added portion of GNU PIC Library under the directory
6792         device/include/pic16 and device/lib/pic16. These files
6793         contain the declarations of SFRs for the PIC18Fxx2 devices.
6794         The directory is initialized via configure from toplevel.
6795
6796 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6797
6798         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6799         the spilllocations to be compared correctly
6800
6801 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6802
6803         * src/SDCCast.c (decorateType): fixed bug introduced today
6804
6805 2004-01-12  Borut Razem <borut.razem AT siol.net>
6806
6807         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6808         doc/sdccman.lyx: upper case pragmas are deprecated
6809
6810 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6811
6812         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6813         in simpler and even better code
6814
6815 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6816
6817         * src/SDCCicode.c (operandOperation): fixed bug #874819
6818         * src/SDCCast.c (decorateType): fixed
6819         char foo (unsigned long ul) { return ul > 0; }
6820
6821 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6822
6823         * doc/sdccman.lyx: Moved and added some sections, small changes
6824         all over. Telling LaTeX to be less strict with word spacing
6825         to better keep the right margin. Changed some notes about
6826         maintainance of the ports in section 3.2.1 - is it OK like this?
6827
6828 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6829
6830         SDCC source changes:
6831         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6832         convilong): modified to inform the pic16 port that builtin functions
6833         are external
6834
6835         PIC16 PORT specific changes:
6836         * src/pic16/device.c pic16_dump_equates() added,
6837         processor registers declared internally by the port are emitted in
6838         the translation as equates,
6839         * src/pic16/gen.c: inline code is passed unprocessed to the
6840         translation,
6841         * (pic16_popGetLit2): fnuction modified to take second operand as
6842         pCodeOp pointer and not as literal,
6843         * (popRegFromIdx): prefixed with pic16_,
6844         * (pic16_popCombine2): modified to receive already allocated pCode
6845         operands,
6846         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6847         * (genFunction): initializes local stack frame and pushes on stack
6848         all the registers used by this function,
6849         * (genEndFunction): restores all registers from stack and restores
6850         stack frame,
6851         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6852         improvements,
6853         * (pic16glue): changed the program startup sequence,
6854         * added new dbName code 'A' for functions placed in absolute section
6855         * src/pic16/main.c: added function attribute _naked,
6856         * added pragma 'code' to place a fnuction at an absolute address,
6857         * added command line arguments --debug-ralloc and --pcode-verbose,
6858         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6859         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6860         * (pic16_newpCodeOpLit2): modified to take the second operand as
6861         pCodeOp pointer,
6862         * (pic16_printpBlock): modified to emit each function in a separate
6863         section,
6864         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6865         UPPER for immediate operands,
6866         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6867         instruction,
6868         * src/pic16/peeph.def: all peepholes with movff are commented out,
6869         because there is a problem in the pcode peep optimizer,
6870         * src/pic16/ralloc.c: the register allocator can now reuse local
6871         function symbols for another function. This saves register usage.
6872         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6873
6874         Added file src/pic16/NOTES with information about program writing on
6875         the current port version.
6876
6877 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6878
6879         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6880         and peephole 252 (array access)
6881
6882 2004-01-09  Borut Razem <borut.razem AT siol.net>
6883
6884         * src/SDCCmain.c : fixed #872250: -l command line defined library
6885           files are scanned before standard library files
6886
6887 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6888
6889         * src/SDCCast.c (decorateType): fixed bug #874046
6890
6891 2004-01-09  Borut Razem <borut.razem AT siol.net>
6892
6893         * support/scripts/sdcc.nsi: remove previous installation
6894
6895 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6896
6897         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6898         bytes for last interrupt vector (mcs51)
6899         * sdcc.spec: fixed typo
6900
6901 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6902
6903         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6904         gen51Code): more efficient parameter receive for --model-large
6905         ("bug" #845294)
6906
6907 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6908
6909         * src/ds390/main.c,
6910         * src/z80/main.c: added missed needLinkerScript flags (more than
6911         one port structure defined in these file)
6912         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6913         bug #795325
6914
6915 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6916
6917         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6918         * src/port.h: added flag needLinkerScript in port->linker
6919         structure to inform whether to create a .lnk file or not,
6920         * src/avr/main.c,
6921         * src/ds390/main.c,
6922         * src/hc08/main.c,
6923         * src/mcs51/main.c,
6924         * src/pic/main.c,
6925         * src/pic16/main.c,
6926         * src/xa51/main.c,
6927         * src/z80/main.c: changed appropriately to configure
6928         needLinkerScript flag
6929         * src/pic/gen.c,
6930         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6931         * src/pic/glue.c: added variable udata_section_name to
6932         override default uninitialized data segment definition for
6933         devices only with SHAREBANK memory (reported from Erik Epetrich)
6934         * (pic14emitOverlay): modified to emit a commented overlay segment
6935         directive when no overlay data exist
6936         * (picglue): modified to emit uninitialized data segment
6937         according to udata_section_name
6938         * src/pic/main.c (_pic14_parseOptions): added command line
6939         options --udata-section-name=[name] to override default
6940         udata definition name
6941         * modified _linkCmd and _asmCmd to include compiler passed
6942         arguments via -W option
6943         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6944         object file from '.rel' to '.o' in port->linker structure,
6945         changed size of fptr from 2 to 3 in port structure
6946
6947 2004-01-07  Borut Razem <borut.razem AT siol.net>
6948
6949         * support/scripts/sdcc.nsi: update PATH
6950         * support/scripts/sdcc.ico: craeted
6951
6952 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6953
6954         * device/include/Makefile.in: fix install
6955         * doc/Makefile: fix install
6956
6957 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6958
6959         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6960         in bug #860505
6961         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6962         how the function variable allocation summary is displayed; also
6963         include information about variables allocated to the overlay
6964         segment
6965
6966 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6967
6968         * as/mcs51/lkmain.c: Help about -Y option
6969         * as/mcs51/lkarea.c: Fixed gcc warnings
6970
6971 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6972
6973         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6974         fixed warning
6975         * support/valdiag/tests/overflow.c: added
6976         * src/SDCCast.c (decorateType),
6977         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6978         LEFT_OP (left shift)
6979
6980 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6981
6982         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6983         (default behaviour).
6984
6985 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6986
6987         A python script to validate compiler diagnostic messages. It can be
6988         used to verify that sdcc complains about bad c source code and
6989         gives a good location of the error.
6990         * support/valdiag/Makefile,
6991         * support/valdiag/valdiag.py,
6992         * support/valdiag/tests/*
6993
6994 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6995
6996         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6997         * src/SDCCsymt.c (newEnumType),
6998         * src/SDCCsymt.h
6999         * support/Util/SDCCerr.c,
7000         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
7001         enum related bugs.
7002         * support/regression/tests/enum.c: added test for enum values that
7003         require at least 2 bytes of storage.
7004
7005 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7006
7007         * src/common.h: added ifndef/define/endif macros
7008         around the header file.
7009         Bug reported from Jesus Calvino-Fraga
7010
7011 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
7012
7013         * sdcc.spec: updated
7014         * device/include/Makefile.in: don't install CVS directories
7015         * device/lib/Makefile.in: added removal of CVS directories after install
7016         * doc/Makefile: fixed install, added local_icons
7017         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
7018         * src/mcs51/gen.c (genRightShift): fixed bug #870788
7019         * src/ds390/gen.c (genRightShift): fixed bug #870788
7020         * src/SDCCast.c (decorateType): fixed bug #870781
7021
7022 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
7023
7024         PIC16 port related changes:
7025         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
7026         added variable stackPos,
7027
7028         * gen.c: genCall, assignResultValue: added support for
7029         pushing/retrieving function parameters to/from stack,
7030         genFunction,genEndFunction: setup stack frame for the
7031         generated function,
7032         genAddrOf: will be changed according to bug 863624
7033
7034         * added files genutils.c and genutils.h which contain gen*
7035         debugged and optimised functions extracted from gen.c
7036
7037         * glue.c: added variable 'externs' which holds extern symbols,
7038         pic16emitRegularMap: is modified to properly handle relocatable
7039          symbols under the new scheme,
7040         pic16createInterruptVect: is modified
7041         pic16printPublics: is modified to emit 'global' assembler directives,
7042         added pic16_printExterns to print extern symbols,
7043         pic16glue: initializes stack/frame pointer in the beginning of
7044         the assembly output. Temporary hack, will be corrected later,
7045         because gplink yet does not support stack and SDCC does not
7046         yet support a type of crt0.o object to create the final binary.
7047
7048         * Removed many lines that contain 8051 legacy code.
7049         * The code is finally placed under a 'code' directive.
7050         * Added port specific options.
7051
7052         * _process_pragma: simplified since now we do not need *special*
7053         include file to define SFR registers. But a separate header
7054         will be needed. This will be developed later.
7055         * _pic16_parseOptions: added, parses port specific options:
7056         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7057         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7058         --preplace-udata-with=
7059
7060         * _pic16_setDefaultOptions: modified to initialize section names,
7061         but hack is temporarly out of order since it needs improvement.
7062         * _pic16_genAssemblerPreamble: configuration words are emitted by
7063         their address instead of their name. This part is incomplete and
7064         supports only the 18Fxx2 devices. Other devices will emit an error
7065         during assembly since they do not contain the same set of config
7066         registers
7067         * _pic16_genIVT: is modified,
7068
7069         * pcode.c: added definitions for some hardware registers that are needed
7070         for stack support
7071         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7072         All PCI entries are updated. Now LFSR is supported.
7073         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7074         * added pic16_newpCodeOpLit2 to support instructions with
7075         two literal arguments
7076         * pic16_pCode2str: corrected code that emits assembler instructions
7077         with two literal operands and those that have an access bit modifier
7078         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7079         this fixes a bug which caused some labels to be lost, when an
7080         assembler directive was added, i.e. banksel,
7081         * pic16_FixRegisterBanking: improved logic that causes the insertion
7082         of bank switching,
7083         * InlineFunction: functions that are called once, are not any more
7084         inlined. This can be a port option in the future,
7085
7086         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7087
7088         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7089         hold the corresponding uninitialized symbols,
7090         * pic16_allocProcessorRegister: registers have explicit marked the
7091         accessBank field,
7092         * pic16_allocInternalRegister: registers are explicit marked as
7093         not used,
7094         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7095         processing list, so bit registers were lost,
7096         *
7097
7098         * ralloc.h: added field 'accessBank' and original symbol operand
7099         in register definition,
7100         * removed the field isMapped from register definition,
7101
7102         ** Several functions have been removed from various sources:
7103         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7104         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7105         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7106         pic16_assignRelocatableRegisters
7107
7108         ** others have been introduced:
7109         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7110         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7111
7112 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7113
7114         * support/scripts/inc2h.pl: changed definition of BIT_AT
7115         to emit 'sbit at' instead of 'bit at'. This was a request.
7116
7117         PIC16 port related preliminary changes:
7118         * gen.c: prefixed function popRegFromString with
7119         pic16_ and all references to it corrected
7120         * pcode.c: all pic16_pc_* hardware registers prefixed
7121         with underscore (_),
7122         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7123         * ralloc.c: newReg(): when register is REG_SFR then
7124         set address to rIdx,
7125         pic16_allocProcessorRegister(): marks register wasUsed=0
7126         pic16_writeUsedRegs(): added a call to assign processor
7127         registers via pic16_assignFixedRegisters
7128
7129 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7130
7131         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7132         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7133         variables in unused register banks.  Also the SSEG is placed
7134         wherever there is enough space for it, and IDATA can be anywhere
7135         in internal RAM.  For now compile using -Wl-Y[stack_size].
7136         The mem file is different for this option as well, since it
7137         makes no sense of talking about DSEG lenght.
7138
7139 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7140
7141         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7142         in certain cases, e.g. when ROM assignment, patch provided
7143         from Albert den Haan.
7144
7145 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7146
7147         Many signedness and type propagation fixes:
7148         * src/SDCCicode.c: made geniCodeCast() static
7149         replaced SPEC_ by IS_ (cosmetic)
7150         (operandOperation): fixed div and mod operation
7151         (usualBinaryConversions): added support for promotion of char
7152         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7153         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7154         (geniCodeAdd): an array index will stay unsigned, even if promoted
7155         from char to int
7156         (geniCodeArray): ditto
7157         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7158         * src/SDCCsymt.c (computeType): added more support for char;
7159         promotion of char is selectable by promoteCharToInt, fixed signedness
7160         for all cases
7161         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7162         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7163         * src/SDCCval (val*): replaced signedness calculation by
7164         computeType()
7165         rearranged if-branches (cosmetic)
7166         (valShift): added warning W_SHIFT_CHANGED
7167         (valCompare): fixed problem with different types
7168         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7169         * support/regression/tests/literalop.c: added many cases
7170         * support/regression/tests/ast_constant_folding.c: changed finally to
7171         'unsigned int'
7172         * .version: new year, new version: 2.3.7
7173         * src/SDCCmain.c (main): applied patch #866468
7174         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7175         provided by Scott Bronson
7176         * doc/sdccman.lyx: updated documentation for sdcdb
7177         updated and added chapter tips
7178
7179 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7180
7181         * src/SDCCsymt.h: missing from yesterday's commits
7182
7183 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7184
7185         * src/SDCC.y (struct_or_union_specifier),
7186         * support/Util/SDCCerr.c,
7187         * support/Util/SDCCerr.h: verify that struct & union tags are used
7188         as declared.
7189
7190 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7191
7192         * src/SDCCglobl.h: missing from yesterday's commits
7193
7194 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7195
7196         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7197         sft_attributes, struct_declaration, parameter_declaration,
7198         type_name, start_block, declaration_list),
7199         * src/SDCC.lex (check_type): support redefinition of typedef names
7200
7201 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7202
7203         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7204         aligned xdata arrays. Erik helped me with the if clause.
7205
7206 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7207
7208         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7209         warning
7210
7211 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7212
7213         * src/SDCCast.h,
7214         * src/SDCCast.c (newAst_),
7215         * src/SDCCicode.h,
7216         * src/SDCCicode.c (ast2iCode, newiCode),
7217         * src/SDCCglobl.h,
7218         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7219         expr, statement, expression_statement, selection_statement,
7220         iteration_statement, expr_opt, jump_statement): foundation for tracking
7221         sequence points
7222         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7223         point code too)
7224
7225 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7226
7227         * support/Util/SDCCerr.c,
7228         * src/SDCCast.h,
7229         * src/SDCCast.c (createCase, createDefault, decorateType),
7230         * src/SDCClabel.c (labelUnreach),
7231         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7232         to error messages.
7233         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7234         (with thanks to Stas Sergeev)
7235         * device/include/time.h,
7236         * device/lib/time.c (CheckTime): suppress unreachable code warning
7237
7238 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7239
7240         * src/SDCCast.c (createIvalCharPtr),
7241         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7242         bug #753752)
7243         * support/regression/tests/nullstring.c: tests for these two bugs
7244
7245 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7246
7247         * support/Util/SDCCerr.h,
7248         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7249         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7250         about storage class and 'at' used inside struct or union
7251         * src/SDCCBBlock.c (iCodeFromeBBlock),
7252         * src/SDCCcse.c (ifxOptimize),
7253         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7254         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7255         printIval, emitStaticSeg, emitOverlay),
7256         * src/SDCClabel.c (deleteIfx),
7257         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7258         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7259         gatherAutoInit, processParms),
7260         * support/Util/SDCCerr.h,
7261         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7262         reporting for post-parse errors.
7263
7264 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7265
7266         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7267         implicit casts via union; they don't work on big endian systems
7268         (possible fix for bug #861138)
7269
7270 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7271
7272         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7273         * src/mcs51/main.c: fixed the fix for bug #737001
7274
7275 2003-12-15  Borut Razem <borut.razem AT siol.net>
7276
7277         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7278
7279 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7280
7281         * support/makebin/makebin.c: put output in binary mode
7282
7283 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7284
7285         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7286         xdata and data memory on startup. Set the environment variable
7287         SDCC_NOGENRAMCLEAR to disable this.
7288         * src/mcs51/peephole.def,
7289         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7290         (allows non-interrupt and interrupt code to safely compete for a resource
7291         without the non-interrupt code having to disable interrupts)
7292
7293 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7294
7295         * src/SDCCicode.c (geniCodeAdd),
7296         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7297         with valFromType if type might be a pointer and host is big endian).
7298         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7299         types, not just integer types.
7300         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7301         multiply defined with mismatching "at" address.
7302
7303 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7304
7305         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7306         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7307         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7308         with embedded nulls (fixed bug #753752)
7309
7310 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7311
7312         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7313         Apparently this did not see much testing (endless loop)
7314
7315 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7316
7317         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7318
7319 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7320
7321         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7322         gracefully handle NULL memmap pointers
7323
7324 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7325
7326         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7327         instead of deleting the iCode when an operand is volatile
7328         * src/z80/gen.c (genDummyRead),
7329         * src/mcs51/gen.c (genDummyRead),
7330         * src/ds390/gen.c (genDummyRead),
7331         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7332         not just IC_RIGHT
7333         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7334         * src/SDCC.y: fixed bug #850420
7335
7336 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7337
7338         Applied z80 i/o port patch from Peter Townson and fixed some operators
7339         to better handle operands in A register.
7340         * device/include/z180.h
7341         * src/SDCC.y
7342         * src/SDCCglue.c
7343         * src/z80/gen.c
7344         * src/z80/gen.h
7345         * src/z80/main.c
7346         * src/z80/peeph-z80.def
7347         * src/z80/peeph.def
7348         * src/z80/z80.h
7349
7350 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7351
7352         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7353
7354 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7355
7356         * device/lib/hc08/_mullong.c: Removed extra #endif
7357
7358 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7359
7360         * sim/ucsim/hc08.src/inst.cc,
7361         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7362         carries from x to h
7363         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7364         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7365         * device/include/stdarg.h: fixed varargs for hc08
7366         * device/lib/Makefile.in,
7367         * device/lib/hc08/Makefile,
7368         * device/lib/hc08/_mulint.c,
7369         * device/lib/hc08/_mullong.c: fixed some endian problems
7370
7371 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7372
7373         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7374         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7375         * device/lib/_gptrget.c,
7376         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7377
7378 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7379
7380         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7381         * src/SDCCast.c (astErrors): fixed bug #846007
7382         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7383
7384 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7385
7386         * src/SDCCast.c (decorateType): disabled a transformation I added in
7387         revision 1.188 (access to fields of a structure at an absolute address);
7388         it breaks with bitfields, extern declarations, and gcse analysis.
7389         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7390         could be assigned through a pointer, so don't complain.
7391         * src/SDCCast.c (astErrors),
7392         * src/SDCCast.h,
7393         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7394
7395 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7396
7397         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7398         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7399         output of __config directives, since gpasm now supports them
7400         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7401         pre-processor macro, i.e. -DMCU=p18f452
7402         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7403         and modified to handle 'cast' icode similarly to '=' icode
7404         * src/pic16/device.h (typedef struct PIC_device): added field
7405         'extMIface' to indicate that chip has external memory interface
7406         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7407         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7408         18F8720
7409
7410 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7411
7412         * src/SDCC.y (pointer): fixed bug #846006
7413         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7414         * src/SDCCast.c (decorateType): fixed bug #846009
7415         * src/ds390/peeph.def,
7416         * src/ds390/gen.c (genAnd, genOr),
7417         * src/mcs51/peeph.def,
7418         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7419
7420 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7421
7422         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7423         * src/SDCCdflow.c
7424         * src/SDCCcse.c
7425         * src/SDCCcse.h
7426         * src/SDCCBBlock.h
7427         * src/SDCCBBlock.c
7428
7429 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7430
7431         fixed bug #845089
7432         * src/SDCCbitv.h,
7433         * src/SDCCbitv.c: added function to free a bitvector
7434         * src/SDCClrange.h,
7435         * src/SDCClrange.c: added function to recompute the liveranges
7436         * src/avr/ralloc.c,
7437         * src/ds390/ralloc.c,
7438         * src/hc08/ralloc.c,
7439         * src/mcs51/ralloc.c,
7440         * src/pic/ralloc.c,
7441         * src/pic16/ralloc.c,
7442         * src/xa51/ralloc.c,
7443         * src/z80/ralloc.c: recompute the liveranges after register packing
7444
7445 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7446
7447         * src/SDCCloop.c (newInduction): fixed bug #845630
7448
7449 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7450
7451         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7452         inadvertantly left behind from my 2003-11-12 change
7453
7454 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7455
7456         Updated headers I neglected to commit yesterday.
7457         * src/SDCClrange.h,
7458         * src/SDCCicode.h
7459
7460 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7461
7462         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7463         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7464         * src/SDCCopt.c (eBBlockFromiCode),
7465         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7466         the creation of the key hash table from the sequencing so it can be used
7467         earlier (for some GCSE bug fixes still pending)
7468
7469 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7470
7471         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7472         * support/regression/tests/addsub.c: testing genPlus shortcut
7473
7474 2003-11-15  Borut Razem <borut.razem AT siol.net>
7475
7476         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7477
7478 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7479
7480         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7481         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7482         ordering is immaterial.
7483         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7484
7485 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7486
7487         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7488         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7489         (SIGSEV) of bug #840381
7490         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7491         unlink new file before rename if new and old filenames are the same)
7492
7493 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7494
7495         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7496         uninitialized variables) for the mcs51. Set environment variable
7497         SDCC_GENRAMCLEAR to test.
7498         xdata initialization slightly shorter
7499
7500 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7501
7502         * src/SDCCsymt.h,
7503         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7504         #838241 & 780691 (basicly the same bug)
7505         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7506         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7507
7508 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7509
7510         * src/SDCCmain.c (linkEdit): "fix" #834252
7511
7512 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7513
7514         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7515         * src/SDCCast.h,
7516         * src/SDCC.y: fixed bug #819403
7517
7518 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7519
7520         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7521         the reentrant attribute.
7522         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7523         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7524         simulation
7525         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7526         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7527         erroneously reduced to a literal.
7528         * src/hc08/ralloc.c (packRegisters, rematStr),
7529         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7530         some cases
7531
7532 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7533
7534         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7535         * doc/sdccman.lyx: changed from 'article' to 'book'
7536         * doc/Makefile: readded test_suite_spec and cdbfileformat
7537
7538 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7539
7540         * device/include/stdlib.h: include malloc.h to comply with ANSI
7541         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7542
7543 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7544
7545         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7546         * doc/clean.mk: also remove *.out files
7547         * doc/sdccman.lyx: some additions, larger top/bottom margins
7548
7549 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7550
7551         * src/SDCC.y: fixed bug #837365
7552         * support/regression/tests/bitopcse.c
7553         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7554         a symbol (might be valop instead)
7555         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7556         * device/lib/clean.mk: added hc08 to the cleaning list
7557
7558 2003-11-04  Borut Razem <borut.razem AT siol.net>
7559
7560         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7561           made 2003-11-04
7562         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7563           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7564           malloc is declared in standard stdlib.h
7565
7566 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7567
7568         * device/lib/hc08/Makefile: need to clean .rel not .o files
7569         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7570
7571 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7572
7573         * src/port.h,
7574         * src/hc08/main.c,
7575         * src/mcs51/main.c,
7576         * src/ds390/main.c,
7577         * src/z80/main.c,
7578         * src/avr/main.c,
7579         * src/pic/main.c,
7580         * src/pic16/main.c,
7581         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7582         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7583         tests (which uses the port's oclsExpense function)
7584         * src/SDCC.y,
7585         * src/SDCCast.c,
7586         * src/SDCCicode.c,
7587         * src/hc08/gen.c,
7588         * src/ds390/gen.c,
7589         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7590
7591 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7592
7593         * src/SDCCcse.c (ifxOptimize),
7594         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7595         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7596         deleting the IFX iCode.
7597         * src/hc08/ralloc.c: reduced unneeded slocs
7598         * src/hc08/gen.c: fixed bug in asmopToBoolean
7599
7600 2003-11-04  Borut Razem <borut.razem AT siol.net>
7601
7602         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7603           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7604           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7605           transferred to configure
7606
7607 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7608
7609         Use headers defined in the C[++] standards:
7610         * sim/ucsim/gui.src/serio.src/fileio.cc
7611         * sim/ucsim/gui.src/serio.src/frontend.cc
7612         * sim/ucsim/gui.src/serio.src/main.cc
7613         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7614         * support/Util/NewAlloc.c
7615         * as/hc08/lklibr.c
7616         * as/mcs51/lklibr.c
7617         * as/z80/aslist.c
7618         * as/z80/assym.c
7619
7620 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7621
7622         * Added MSVC projects for hc08 assembler and linker:
7623         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7624         /as/hc08/link_hc08.dsp
7625
7626 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7627
7628         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7629
7630 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7631
7632         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7633
7634 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7635
7636         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7637
7638 2003-10-31  Borut Razem <borut.razem AT siol.net>
7639
7640         * support/cpp2/cpplib.h,
7641           support/cpp2/cpplib.c,
7642           support/cpp2/cpplex.c,
7643           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7644           to switch _asm block preprocessing on / off. Default is
7645           #pragma preproc_asm +
7646
7647 2003-10-31  Borut Razem <borut.razem AT siol.net>
7648
7649         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7650           when outputting comment blocks (when executed with -C option) and
7651           _asm (SDCPP specific) blocks
7652
7653 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7654
7655         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7656
7657 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7658
7659         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7660
7661 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7662
7663         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7664         * src/SDCCast.c (decorateType): fixed bug #832664
7665
7666 2003-10-31  Borut Razem <borut.razem AT siol.net>
7667
7668         * support\cpp2\cpplex.c: fixed for SDCPP:
7669           comments(when executed with -C option) and _asm blocks
7670           were included even if they where in skipped #if block.
7671           Applied solution from GCC cpp 3.3.2
7672
7673 2003-10-31  Borut Razem <borut.razem AT siol.net>
7674
7675         * src/SDCC.lex: sdcc now understands both formats:
7676           '# <line_number> <file_name>' and
7677           '#line <line_number> <file_name>'
7678         * support/cpp2/cppmain.c: sdcpp now generates the standard
7679           '# <line_number> <file_name>' instead of former
7680           '#line <line_number> <file_name>'
7681
7682 2003-10-30  Borut Razem <borut.razem AT siol.net>
7683
7684         * support/cpp2/cpphash.h,
7685         * support/cpp2/cpplib.h
7686         * support/cpp2/cpplex.c,
7687         * support/cpp2/cppmain.c,
7688         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7689
7690 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7691
7692         Fixed a number of problems revealed by bug #827883.
7693         * src/SDCCloop.c (loopInvariants): Spill location of the
7694         result operand should be recomputed if extracted from
7695         a loop. Also, don't extract assignments of an iTemp
7696         from a literal.
7697         * src/SDCCast.c (isConformingBody): loop reversal should
7698         not occur if the control variable is involved with a
7699         relational operator.
7700
7701 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7702
7703         * .version: bumped to 2.3.6 to reflect the big improvements
7704         made by Erik and Klaus. Thanks!
7705
7706 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7707
7708         Replaced the livrange code.
7709         * src/SDCClrange.c: added new LR code
7710         * src/SDCCloop.c,
7711         * src/SDCCBBlock.h: removed remainig parts from old LR code
7712         * src/ds390/ralloc.c,
7713         * src/ds390/gen.c: minor fixes to make it work with new code
7714
7715 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7716
7717         * as/hc08/asm.h,
7718         * as/hc08/lkrloc.c,
7719         * src/hc08/gen.c,
7720         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7721         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7722         (tweaked fix for bug #818696)
7723
7724 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7725
7726         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7727
7728 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7729
7730         * src/SDCCmain.c,
7731         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7732         * src/mcs51/gen.c (gencjneshort),
7733         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7734         more efficient (per Scott Bronson's suggestion)
7735
7736 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7737
7738         Extended the semantics of the critical keyword to include
7739         individual statements. See RFE #827755 and #799831
7740         * src/SDCC.y
7741         * src/SDCCicode.c
7742         * src/SDCCopt.c
7743         * src/SDCCast.c
7744         * support/Util/SDCCerr.c
7745         * support/Util/SDCCerr.h
7746         * src/mcs51/gen.c
7747         * src/ds390/gen.c
7748         * src/hc08/gen.c
7749
7750 2003-10-19  Borut Razem <borut.razem AT siol.net>
7751
7752         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7753
7754 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7755
7756         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7757         Fixed bug #818696
7758         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7759         and predecrement operand is displayed
7760
7761 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7762
7763         * src/SDCCval.c (valMinus): fixed bug #826041
7764
7765 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7766
7767         Some hc08 related updates that I missed earlier
7768         * sim/ucsim/stypes.h
7769         * support/regression/ports/hc08/spec.mk
7770
7771 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7772
7773         New target "hc08" for the Motorola 68hc08 family of micros
7774
7775         * configure
7776         * configure.in
7777         * Makefile
7778         * src/hc08/*
7779         * src/SDCCmain.c
7780         * src/port.h
7781         * sim/ucsim/hc08.src/*
7782         * sim/ucsim/configure.in
7783         * src/ucsim/configure
7784         * sim/ucsim/packages_in.mk
7785         * as/hc08/*
7786         * as/Makefile
7787         * device/include/mc68hc908qy.h
7788         * device/lib/hc08/*
7789         * device/lib/Makefile.in
7790         * support/regression/ports/hc08/*
7791         * support/regression/Makefile
7792
7793 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7794
7795         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7796         regression test
7797         * src/ds390/gen.c (genCast): fixed bug #821957
7798
7799 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7800
7801         * device/lib/logf.c: "fixed" overlay bug
7802         * support/regression/ports/host/spec.mk: added m library
7803         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7804         * support/regression/tests/float_trans: added (for Eric)
7805
7806 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7807
7808         * src/mcs51/gen.c (genCpl): fixed bug
7809         http://sf.net/mailarchive/message.php?msg_id=6263915
7810
7811 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7812
7813         * src/SDCCast.c (decorateType): added extended constant folding
7814         * src/SDCCsymt.c (computeType): cleanup
7815         * src/SDCCval.c (valShift): minor optimization
7816         * support/regression/tests/ast_constant_folding.c: added
7817
7818 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7819
7820         * src/SDCCmain.c: removed some unintended changes
7821
7822 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7823
7824         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7825         * src/z80/gen.c: fixed part of bug #817589
7826         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7827
7828 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7829
7830         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7831         * src/SDCCcflow.c
7832         * src/SDCCcse.c
7833         * src/SDCCdflow.c
7834         * src/SDCClabel.c
7835         * src/SDCClrange.c
7836         * src/SDCCmem.c
7837         * src/SDCCopt.c
7838         * src/SDCCpeeph.c
7839         * src/SDCCset.c
7840         * src/avr/ralloc.c
7841         * src/ds390/ralloc.c
7842         * src/izt/ralloc.c
7843         * src/mcs51/ralloc.c
7844         * src/pic/ralloc.c
7845         * src/pic16/ralloc.c
7846         * src/xa51/ralloc.c
7847         * src/z80/ralloc.c
7848         * src/z80/gen.c: removed unused label "release:"
7849
7850 2003-10-06  Borut Razem <borut.razem AT siol.net>
7851
7852         * src/SDCC.lex: removed definition of unused variables
7853           save_optimize and save_options
7854
7855 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7856
7857         * clean.mk: removed '=' in "-maxdepth=1"
7858         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7859         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7860
7861 2003-10-06  Borut Razem <borut.razem AT siol.net>
7862
7863         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7864           my_unput() replaced by unput()
7865
7866 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7867
7868         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7869         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7870         type-punned pointer will break strict-aliasing rules"
7871         Old LR behaviour is again default; Klaus' LR can be choosen by
7872         defining the environment variable LRKLAUS
7873         * src/SDCCBBlock.h
7874         * src/SDCCloop.c
7875         * src/SDCClrange.c
7876         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7877         * clean.mk: fixed removal of files in bin/CVS/
7878         * device/lib/clean.mk: fixed removal of directories small and large
7879         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7880         * src/SDCCicode.c,
7881         * src/SDCCval.c: removed superflous test for pedantic
7882
7883 2003-10-05  Borut Razem <borut.razem AT siol.net>
7884
7885         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7886           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7887           message "unmatched #pragma SAVE and #pragma RESTORE"
7888
7889 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7890
7891         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7892           assembly, critical functions, atomic, nojtbound)
7893
7894 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7895
7896         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7897         * src/SDCCBBlock.h
7898         * src/SDCCloop.c
7899         * src/SDCCloop.h
7900         * src/SDCClrange.c
7901
7902 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7903
7904         * src/z80/gen.h,
7905         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7906         * src/mcs51/gen.h
7907         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7908         * src/ds390/gen.h
7909         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7910         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7911         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7912
7913 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7914
7915         * src/z80/gen.c (genRet): fixed bug #524753
7916         * src/z80/gen.c (genCast): fixed internal error on cast from
7917         pointer to long
7918         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7919         fix for bug #477835 to the z80
7920         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7921         for tracking iCodes in the peephole optimizer for z80
7922
7923 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7924
7925         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7926         the other part of bug #814548
7927         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7928
7929 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7930
7931         * src/SDCCcse.c: fixed part of bug #814548
7932
7933 2003-09-28  Borut Razem <borut.razem AT siol.net>
7934
7935         * src/asm.c: rewrite of printILine() to use temporary file instead
7936           a pipe
7937         * src/xa51/main.c: commented out declaration of int rewinds
7938
7939 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7940
7941         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7942
7943 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7944
7945         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7946         * src/asm.c (printILine): Fixed bug #811015
7947
7948 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7949
7950         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7951         freeing.
7952
7953 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7954
7955         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7956         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7957         to correctly handle general case of AOP_PAIRPTR
7958         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7959
7960 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7961
7962         * src/mcs51/ralloc.c (fillGaps),
7963         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7964         register positioning bug)
7965
7966 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7967
7968         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7969
7970 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7971
7972         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7973         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7974         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7975         (ralloc doesn't intentionally do this now, but perhaps later)
7976         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7977         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7978         register positioning bugs (Fixed bug #762602 and #795325)
7979         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7980         (Fixed bug #808779)
7981         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7982         lines that --i-code-in-asm generates
7983
7984 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7985
7986         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7987         trying to fclose a FILE* that was already closed.
7988
7989 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7990
7991         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7992         of const struct should be treated as if const themselves)
7993
7994 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7995
7996         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7997
7998 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7999
8000         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
8001         Unix (/n) and DOS (/r/n) line terminations.
8002
8003 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8004
8005         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
8006         bug #613775
8007
8008 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8009
8010         * src/mcs51/gen.c (genFunction, genEndFunction),
8011         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
8012         and restore of EA so that stack offsets to parameters are
8013         correct when using both critical and reentrant/stack-auto.
8014         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
8015         size (can be triggered in error if sloc is shared between
8016         different sized objects)
8017         * device/include/float.h: fixed macros to explicitly use
8018         unsigned long where needed
8019
8020 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
8021
8022         Feature req. 799831: added code to allow nesting of critical functions
8023         * src/mcs51/gen.c (genFunction, genEndFunction)
8024         * src/ds390/gen.c (genFunction, genEndFunction)
8025
8026 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8027
8028         * src/SDCCsymt.c (sclsFromPtr),
8029         * src/SDCCsymt.h,
8030         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
8031         support for standard C idiom of memory mapped variables; for
8032         example, *((xdata int*)0x1234) = 1 is now internally equivalent
8033         to xdata int at 0x1234 tempvar = 1.
8034         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
8035         provided by Akiya ISHIDA
8036
8037 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
8038
8039         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
8040         * src/SDCCval.c (constVal): added reduction from int to char
8041         * src/SDCCval.c (valMult, valDiv): fixed sign handling
8042         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
8043         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
8044         to ignore the sign
8045         * support/regression/tests/shifts.c: fixed
8046
8047 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8048
8049         * src/z80/gen.c (genXor): Fixed bug #805445
8050
8051 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8052
8053         Fixed bug #621531 (const & volatile confusion in the type chain).
8054         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8055         refer to the const or volatile state of the pointer itself.
8056
8057         * src/SDCCast.c
8058         * src/SDCCglue.c
8059         * src/SDCCicode.c
8060         * src/SDCCsymt.c
8061         * src/SDCCval.c
8062         * src/SDCC.y
8063         * src/SDCCsymt.h
8064         * src/pic/gen.c
8065         * src/pic/ralloc.c
8066         * src/pic16/gen.c
8067         * src/pic16/ralloc.c
8068         * support/regression/tests/const.c
8069
8070 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8071
8072         When checking for duplicated modules, use absolute paths
8073         instead of relative paths.  Files changed:
8074
8075         * as/mcs51/lklib.c
8076         * link/z80/lklib.c
8077
8078 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8079
8080         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8081
8082 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8083
8084         * device/include/string.h: added size_t typedef, changed
8085         prototypes to use size_t, eliminated separate reentrant and
8086         non-reentrant declarations, added _memmove declaration
8087         * device/lib/_memcpy.c: changed to use size_t instead of int,
8088         changed /4 to >>2 to avoid division library call
8089         * device/lib/_memcmp.c,
8090         * device/lib/_memset.c,
8091         * device/lib/_strncat.c,
8092         * device/lib/_strncpy.c,
8093         * device/lib/_strncmp.c: changed to use size_t instead of int
8094         * device/lib/_memmove.c: new file (fixed bug #772294)
8095         * device/lib/Makefile.in: added _memmove.c
8096         * device/lib/z80/asm_strings.s: fixed bug #772290
8097         * support/regression/tests/bitfields.c: attempt to fix host assertion
8098         failure on amd64-unknown-linux2.2
8099
8100 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8101
8102         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8103         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8104         * as/z80/asmain.c (main): fixed bug #801766
8105
8106 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8107
8108         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8109         compilers
8110
8111 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8112
8113         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8114         reported in bug #800609
8115
8116 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8117
8118         * Top header beautifications in src/pic16 directory:
8119           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8120           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8121           pcoderegs.h, ralloc.c, ralloc.h
8122         * main.c: added top header and GPL license notice
8123         * pcode.c: fixed the if-conditional warning
8124
8125 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8126
8127         * device/lib/_mullong.c: replaced int by short for gcc
8128
8129 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8130
8131         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8132         and JUMPTABLE iCodes properly now (worked by accident before)
8133         * src/mcs51/gen.c (leftRightUseAcc),
8134         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8135         iCode properly now. Use getSize instead of nRegs since a & b
8136         aren't part of the nRegs tally.
8137
8138 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8139
8140         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8141         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8142           before instructions that use the _STATUS register
8143
8144 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8145
8146         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8147         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8148         fetching of the pointer
8149         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8150         copied from genNearPointerSet()
8151         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8152         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8153         If they pop r0/r1 they must be called in the opposite order than aopOp().
8154         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8155         (resp. --stack-auto), prepared for --xstack
8156
8157 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8158
8159         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8160
8161 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8162
8163         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8164         these ports have their own __sdcc_external_start()
8165
8166 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8167
8168         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8169         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8170         type for bits was changed. It resulted in bit variables becoming
8171         global, which is not permitted in PIC 14 assembly output.
8172
8173 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8174
8175         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8176
8177 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8178
8179         Z80 and MCS51 linkers complaint if a public symbol is defined
8180         in more than one library module:
8181
8182         * as/mcs51/lklib.c
8183         * link/z80/lklib.c
8184         * as/mcs51/Makefile.in
8185
8186 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8187
8188         A few small changes that speed up the peephole optimizer.
8189
8190         * src/SDCCpeeph.c
8191
8192 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8193
8194         Try to make the peephole optimizer smarter by maintaining
8195         an association between the assembly source code and the
8196         iCodes that originated them. Put this information to use
8197         with a new peephole rule condition "notVolatile" so that
8198         the rules can be aggressive yet still safe.
8199
8200         * src/SDCCpeeph.c
8201         * src/SDCCpeeph.h
8202         * src/mcs51/gen.c
8203         * src/mcs51/peeph.def
8204
8205 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8206
8207         Fixed bug #741761
8208
8209         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8210         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8211         if the left or right operand symbols have the accuse flag set.
8212
8213 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8214
8215         Changed the type of the result of the ! (NOT) operator to char;
8216         previously it returned the same type as the source. This allows
8217         us to eliminate all the genFloatNot functions (all of its target
8218         implementations were very buggy) since !float can use the same
8219         code as !long now.
8220
8221         * src/SDCCicode.c (ast2iCode): ! returns char
8222         * src/mcs51/gen.c (genNot, genNotFloat),
8223         * src/ds390/gen.c (genNot, genNotFloat),
8224         * src/z80/gen.c (genNot, genNotFloat),
8225         * src/pic/gen.c (genNot, genNotFloat),
8226         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8227
8228 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8229
8230         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8231         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8232            during interrupts. Ensure WSAVE is located at a shared bank address.
8233         2. Fixed page selection in some places
8234         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8235            the registers name strings.
8236         4. Fixed "signed / unsigned compare" compiler warnings.
8237         5. The PIC port manages its own allocation of the general purpose
8238            registers, but makes no attempt to reuse them. As a result when
8239            compiling it soon runs out of general purpose registers. Some
8240            additional code was added to the files pcode.c and device.c to walk
8241            through the function call tree and rename the registers so that they
8242            get reused.
8243
8244         * src/pic/device.c
8245         * src/pic/gen.c
8246         * src/pic/glue.c
8247         * src/pic/pcode.c
8248         * src/pic/pcode.h
8249         * src/pic/ralloc.c
8250         * src/pic/ralloc.h
8251         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8252         genPlus() & genMinus() when the result is the same as left or right
8253
8254 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8255
8256         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8257
8258 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8259
8260         Made bitfield a distinct type from bit so that bitfields
8261         convert as per ANSI C and bits retain their traditional
8262         boolean style behaviour. Implemented bitfield support in
8263         the z80 port.
8264
8265         * src/SDCCsymt.h,
8266         * src/SDCCsymt.c,
8267         * src/SDCCast.c,
8268         * src/cdbFile.c,
8269         * src/mcs51/gen.c,
8270         * src/ds390/gen.c: bit v bitfield split
8271         * src/z80/gen.c: New support for bitfields
8272         * support/regression/tests/bitfields.c: reenabled z80,
8273         added more tests
8274
8275 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8276
8277         Rules 246.x, 247.x relate to bitfields, the others speed up
8278         access to xdata mapped I/O devices.
8279
8280         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8281
8282 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8283
8284         Cleaned up genPackBits and genUnpackBits and added two helper
8285         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8286         for literal assignments in genPackBits (thanks to Frieder for
8287         reminding me).
8288
8289         * src/mcs51/gen.c
8290         * src/ds390/gen.c
8291
8292 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8293
8294         Fixed bug #748310 (pointer to function type mishandled when the
8295         function name is omitted). Also fixed a SIGSEGV when a function
8296         attribute (reentrant, etc) is used on a non-function or on a
8297         function but misplaced before the parameter list.
8298
8299         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8300         bug #748310
8301         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8302         * support/Util/SDCCerr.h,
8303         * support/Util/SDCCerr.c: Added func attr misuse error msg
8304
8305 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8306
8307         Fixed bug #787649 by anonymous
8308         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8309         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8310
8311 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8312
8313         Fixed numerous bitfield problems.
8314
8315         * src/SDCC.y: More bitfield related error checking
8316         * src/SDCCsymt.h,
8317         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8318         * support/Util/SDCCerr.h,
8319         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8320         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8321         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8322         * support/regression/tests/bitfields.c: tests added
8323
8324 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8325
8326         Made the constant following the "interrupt" keyword optional. If
8327         omitted, the function will not automatically be given an entry
8328         in the interrupt vector table (similar to #pragma NOIV, but
8329         less syntacticly kludgy). The interrupt number is also now
8330         range checked. Also fixed a bug in the high order bit example
8331         in the manual.
8332
8333         * src/SDCC.y
8334         * src/SDCCmem.c
8335         * src/SDCCglue.c
8336         * src/SDCCsymt.h
8337         * support/Util/SDCCerr.c
8338         * support/Util/SDCCerr.h
8339         * doc/sdccman.lyx
8340
8341 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8342
8343         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8344         * src/SDCCicode.c (operandOperation): rewritten some ops
8345         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8346         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8347         other type
8348         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8349         be re-activated by defining REDUCE_LITERALS)
8350         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8351         unsigned, but are signed by default
8352         * src/SDCCval.c (constVal): rearranged
8353         * src/SDCCval.c (valMod): preliminary fix
8354         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8355         * support/regression/literalop.c: added, work in progress
8356
8357 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8358
8359         Generate warnings for useless declarations like "char data;"
8360         that don't do what new users expect.
8361
8362         * src/SDCC.y
8363         * support/Util/SDCCerr.h
8364         * support/Util/SDCCerr.c
8365
8366 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8367
8368         * src/SDCCval.c (valMult): fix overflow detection of negative int
8369
8370 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8371
8372         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8373
8374         Changes to support big endian targets:
8375
8376         * src/ports.h
8377         * src/SDCCglue.c
8378         * src/avr/main.c
8379         * src/ds390/main.c
8380         * src/izt/i186.c
8381         * src/mcs51/main.c
8382         * src/pic/main.c
8383         * src/pic16/main.c
8384         * src/xa51/main.c
8385         * src/z80/main.c
8386
8387 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8388
8389         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8390         * device/lib/time.c: fixed warning "integer overflow in expression"
8391
8392 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8393
8394         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8395         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8396         constants are unsigned; added recognition of "u" flag for unsigned
8397         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8398         * src/SDCCval.c (valDiv, valMod): fixed signdness
8399         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8400         signedness of modulo, left and right shift
8401         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8402         * support/Util/SDCCerr.h: added warning W_INT_OVL
8403         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8404         * src/SDCCast.c (ast_print): improved output of constants
8405
8406 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8407
8408         Fixed some warnings when building with MSVC:
8409
8410         * as\mcs51\asdata.c
8411         * as\z80\asdata.c
8412         * as\mcs51\asm.h
8413         * as\z80\asm.h
8414         * link\z80\aslink.h
8415         * link\z80\lkdata.c
8416         * link\z80\lkeval.c
8417         * link\z80\lkgb.c
8418         * link\z80\lkihx.c
8419         * link\z80\lks19.c
8420         * link\z80\lksym.c
8421         * support\cpp2\cpplib.c
8422         * src\ds390\gen.c
8423         * src\mcs51\gen.c
8424
8425 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8426
8427         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8428
8429 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8430
8431         * support\librarian\clean.mk: Do not remove Makefile.
8432         * support\librarian\Makefile: added.
8433
8434 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8435
8436         Added librarian to MSVC build:
8437         * all.dsp
8438         * sdcc.dsw
8439         * support\librarian\librarian.dsp
8440
8441         'configure' not needed for librarian, removed:
8442         * support\librarian\configure
8443         * support\librarian\configure.in
8444         * support\librarian\config_in.h
8445         * support\librarian\Makefile.in
8446
8447         Hopefully these ones built the librarian and the rest of sdcc properly:
8448         * Makefile
8449         * Makefile.common.in
8450
8451         Messed up 'configure', so revert to previous version:
8452         * configure
8453         * configure.in
8454
8455 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8456
8457         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8458         there, while the mantissa of a double is "only" 53 bits wide.
8459
8460 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8461
8462         Adding sdcclib to the build.  MSVC project coming soon.
8463         Files added/changed:
8464
8465         * support\librarian\clean.mk
8466         * support\librarian\configure
8467         * support\librarian\configure.in
8468         * support\librarian\config_in.h
8469         * support\librarian\Makefile.bcc
8470         * support\librarian\Makefile.in
8471         * support\librarian\sdcclib.c
8472         * Makefile.bcc
8473         * Makefile
8474         * Makefile.common.in
8475         * configure
8476         * configure.in
8477
8478 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8479
8480         Linker now complaints if linked modules have conflicting options, for
8481         example, one compiled using --model-large and another one compiled with
8482         --model-small.  The following files were modified:
8483
8484         * as\mcs51\asdata.c
8485         * as\mcs51\aslink.h
8486         * as\mcs51\asm.h
8487         * as\mcs51\asmain.c
8488         * as\mcs51\asout.c
8489         * as\mcs51\i51pst.c
8490         * as\mcs51\lkdata.c
8491         * as\mcs51\lklibr.c
8492         * as\mcs51\lkmain.c
8493         * as\z80\asdata.c
8494         * as\z80\asm.h
8495         * as\z80\asmain.c
8496         * as\z80\asout.c
8497         * as\z80\z80pst.c
8498         * link\z80\aslink.h
8499         * link\z80\lkdata.c
8500         * link\z80\lklibr.c
8501         * link\z80\lkmain.c
8502         * src\SDCCglue.c
8503
8504 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8505
8506         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8507         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8508
8509 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8510
8511         * src/z80/mappings.i: fix _mul[us][int,long] entries
8512
8513 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8514
8515         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8516
8517 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8518
8519         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8520         * support/regression/tests/bitopcse.c: added
8521         fixed warning:
8522         * src/avr/gen.c:
8523         * src/pic/gen.c:
8524         * src/pic16/gen.c:
8525         * src/z80/gen.c:
8526         * src/xa51/gen.c:
8527
8528 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8529
8530         added support for new library format to z80, gbz80 linkers:
8531         *link/z80/aslink.h
8532         *link/z80/lklex.c
8533         *link/z80/lklib.c
8534         *link/z80/lklist.c
8535
8536 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8537
8538         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8539         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8540
8541 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8542
8543         added DUMMY_READ_VOLATILE:
8544         * src/SDCC.y:
8545         * src/avr/gen.c:
8546         * src/xa51/gen.c:
8547         * src/z80/gen.c:
8548         * src/pic/gen.c:
8549         * src/pic16/gen.c:
8550         * src/mcs51/gen.c:
8551         * src/ds390/gen.c:
8552         * src/SDCCcse.c (algebraicOpts): many improvements
8553         * src/SDCCcse.h: removed algebraicOpts()
8554         * src/SDCCicode.c (picDummyRead): added
8555
8556 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8557
8558         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8559         "Insufficient space in data memory".
8560
8561 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8562
8563         * src/mcs51/gen.c: fixed bug #771358
8564         * src/z80/gen.c: fixed bug #759087
8565
8566 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8567
8568         * src/pic16/glue.c: minor cleanup by Vangelis
8569
8570 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8571
8572         * device/include/regc515c.h: fixed #758477
8573         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8574         * device/lib/_gptrput.c: saved a few bytes
8575         * my tab spacing is 8, yours too?)
8576         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8577         * device/lib/serial.c: process RX bytes earlier than TX bytes
8578         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8579
8580 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8581
8582         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8583
8584 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8585
8586     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8587
8588 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8589
8590         * device/lib/Makefile.in: bad fix, reverted to 1.43
8591
8592 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8593
8594         * device/lib/Makefile.in: added missing z80 object files
8595
8596 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8597
8598         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8599         pic16 progress by Vangelis:
8600         * src/SDCCglobl.h:
8601         * src/SDCCmain.c:
8602         * src/pic/Makefile:
8603         * src/pic:
8604         * pic/Makefile:
8605         * pic16/device.c:
8606         * pic16/device.h:
8607         * pic16/gen.c:
8608         * pic16/gen.h:
8609         * pic16/genarith.c:
8610         * pic16/glue.c:
8611         * pic16/main.c:
8612         * pic16/pcode.c:
8613         * pic16/pcode.h:
8614         * pic16/pcodepeep.c:
8615         * pic16/peeph.def:
8616
8617 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8618
8619     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8620
8621 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8622
8623     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8624     added gbz80 build to MSVC project.
8625     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8626     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8627     from 8051 stuff and setup so it links using a .lnk file.
8628
8629 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8630
8631     * support/librarian/sdcclib.c: sdcc librarian.
8632     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8633     with sdcclib.
8634
8635 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8636
8637     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8638
8639 2003-07-02  Borut Razem <borut.razem AT siol.net>
8640
8641         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8642         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8643         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8644         src/xa51/main.c, src/z80/main.c:
8645         virtualization of glue() function: each port has it's own glue function,
8646         which is accessed by do_glue function pointer in PORT.general structure
8647
8648 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8649
8650         * DS800C400 fun, improved ROM interface and tinibios.
8651
8652 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8653
8654         * More support for DS80C400. Now includes beginning of interface to ROM.
8655
8656 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8657
8658         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8659
8660 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8661
8662         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8663
8664 2003-06-19  Borut Razem <borut.razem AT siol.net>
8665
8666         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8667
8668 2003-06-19  Borut Razem <borut.razem AT siol.net>
8669
8670         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8671         fixed Z80 port - crt0.o: cannot open.
8672
8673 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8674
8675         * support/Util/MySystem.c (merge_command): revert bad fix
8676
8677 2003-06-18  Borut Razem <borut.razem AT siol.net>
8678
8679         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8680
8681 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8682
8683         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8684         option --use-stdout sends errors to stdout instead of stderr.
8685
8686 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8687
8688         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8689
8690 2003-06-15  Borut Razem <borut.razem AT siol.net>
8691
8692         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8693         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8694         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8695         fixed width array of pointers replaced with sets;
8696         multiple include and lib paths ared transferred to preprocessor and linker
8697         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8698         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8699         fixed width array of pointers
8700         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8701         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8702         fixupPath(), getPathDifference()
8703         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8704         fixed width array of pointers
8705
8706 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8707
8708         * src/pic16/ralloc.c: fix warnings
8709         * src/pic16/pcode.c: fix warning
8710
8711 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8712
8713          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8714         know all the details, but essentially this set of changes enable
8715         the pic16 port to generate movff instructions and generate assembler
8716         directives,
8717         * src/SDCCmain.c:
8718         * src/pic16/gen.c:
8719         * src/pic16/glue.c:
8720         * src/pic16/pcode.c:
8721         * src/pic16/device.c:
8722         * src/pic16/main.c:
8723         * src/pic16/pcode.h:
8724         * src/pic16/pcoderegs.c:
8725         * src/pic16/ralloc.c:
8726         * src/pic16/ralloc.h:
8727
8728 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8729
8730         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8731         added option --vc, so sdcc errors and warnings are compatible with
8732         Microsoft Visual Studio.
8733
8734 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8735
8736         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8737           device/lib/libfloat.lib: added atof function.
8738
8739 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8740
8741         * doc/sdccman.lyx: updated to Lyx 1.3
8742         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8743         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8744         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8745
8746 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8747
8748         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8749
8750 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8751
8752         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8753           additions to the "related tools/documentation" section
8754
8755 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8756
8757         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8758
8759 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8760
8761         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8762         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8763
8764 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8765
8766         * doc/sdccman.lyx: fix double dash and other minor things
8767         * doc/Makefile: fix double dash
8768
8769 2003-05-28  Karl Bongers(patches from Martin Helmling)
8770         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8771           condition and ignore commands.
8772
8773 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8774
8775         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8776           is in parts still quite out of date, I did changes as far as I felt makes sense
8777           for a non-native english speaker.
8778           Please feel free to add to the manual or to correct my changes.
8779         * doc/Makefile: undid touching the date of intermediate tex files.
8780
8781 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8782
8783         * doc/sdccman.lyx: Manual has an index now
8784
8785 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8786
8787         Finalize muluint/mulsint and mululong/mulslong merging:
8788         * device/lib/_mulint.c
8789         * device/lib/_mullong.c
8790         * device/lib/gbz80/mul.s
8791         * device/lib/gbz80/stubs.s
8792         * device/lib/z80/mul.s
8793         * device/lib/z80/stubs.s
8794         * src/SDCCsymt.c (initCSupport)
8795
8796 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8797
8798         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8799         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8800           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8801           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8802           instead of /Zm500.
8803
8804 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8805
8806         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8807           the regression tests I'm not brave enough to enable 245.b, 245.c
8808         * doc/sdccman.lyx: added latex preamble for hyperref package.
8809           Using pdflatex this will give you a hyperlinked pdf file with
8810           bookmarks. (prepend '%' before /usepackage if this breaks something)
8811
8812 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8813
8814          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8815
8816 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8817
8818         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8819
8820 2003-05-21    <johan AT balder>
8821
8822         * src/SDCCglue.c (printIval): fixed bug #739934
8823
8824 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8825
8826         Applied patch from bug 737905 (renamed yylineo to mylineno):
8827         * src/altlex.c
8828         * src/SDCCast.c
8829         * src/SDCglobl.h
8830         * src/SDCC.lex
8831         * src/SDCCsymt.c
8832         * src/SDCCval.c
8833         * src/pic16/pcode.c: Cleaned warnings
8834         * src/pic16/pcodeflow.c: Cleaned warnings
8835         * src/pic16/pcoderegs.c: Cleaned warnings
8836
8837 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8838
8839         * src/pic16/pcode.c: Cleaned warnings
8840         * src/pic16/pcodepeep.c: Cleaned warnings
8841         * src/pic16/ralloc.c: Cleaned warnings
8842
8843 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8844
8845         * doc/sdccman.lyx: fixed bug 739745
8846         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8847
8848 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8849
8850         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8851         it can be defined with CFLAGS when running configure
8852         * src/SDCCmain.c: fixed compiling + linking with object files
8853
8854 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8855
8856         * configure.in: configure for pic16 port,
8857             added --disable-pic16-port
8858         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8859         * src/SDCCmain.c: linkOptions is changed to set *,
8860             added if/endif conditional macros to remove options help
8861             messages from optionsTable when a port is not configured, added
8862             support for the PIc16 port in the ports table, when executing
8863             the compiler with no port specified on command line, a default
8864             port is selected with the new macro DEFAULT_PORT which is
8865             defined in port.h, in setDefaultOptions() linkOptions is removed
8866             from initialization assignment, since now it is a set,
8867             parseCmdLine uses setParseWithComma for linkOptions, in
8868             linkEdit() linkOptions are accessed with new function indexSet()
8869             which returns the i'th item of a set variable. See SDCCset.c, in
8870             linkEdit() when calling buildCmdLine(), added linkOptions as
8871             last argument. Now users can pass arguments to gplink via the
8872             -Wl option, main() uses pic16glue() to glue up pic16 programs
8873         * src/SDCCpeeph.c: various changes to support pic16
8874         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8875             return the i'th item of the set
8876         * src/SDCCset.h: added function prototype for indexSet()
8877         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8878         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8879         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8880             added macro DEFAULT_PORT
8881         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8882         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8883             generated
8884         * src/pic16/glue.c: commented out some error producing lines
8885         * src/pic16/main.c: __config directives are commented out to stop
8886             gpasm complaining and test the linkage with gplink, _linkCmd and
8887             _asmCmd changed to be more gplink and gpasm friendly
8888         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8889             produced an error when parsed, peep rule 12 is added to utilize
8890             movff, but it is commented out since the pCode does not support
8891             yet a command with 2 address arguments
8892
8893 2003-05-18    <johan AT balder>
8894
8895         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8896         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8897 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8898
8899         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8900   Added feature to script commands from file.
8901
8902 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8903
8904         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8905         * src/SDCCutil.c: include ctype.h for win32
8906
8907 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8908
8909         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8910
8911 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8912
8913         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8914   Fixed so you can set breakpoints prior to run, run does not stop
8915   on entry now.  Add tbreak.  Other enhancements and fixes for use
8916   with ddd.
8917
8918 2003-05-12  Borut Razem <borut.razem AT siol.net>
8919
8920         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8921
8922 2003-05-11  Borut Razem <borut.razem AT siol.net>
8923
8924         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8925         the path of bin directory, so that PATH is the only env. variable, which has to be set
8926         in case of standard installation.
8927         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8928         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8929         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8930
8931 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8932
8933         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8934         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8935         temp files are in the port dir; clean the gen/test directory when
8936         generating new test.c
8937         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8938         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8939         * support/regression/tests/zeropad.c: added
8940
8941 2003-05-09    <johan AT balder>
8942
8943         * src/SDCCglue.c: fixed bug #597940
8944
8945 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8946
8947         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8948   cache sfr, optimize next,step, fix off by one sourceline,
8949   support ddd list function.
8950         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8951
8952 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8953
8954         * support/regression/HTMLgen.py: added compare_s2f()
8955         * support/regression/Makefile: redo 1.27
8956         * support/regression/generate-cases.py: redo 1.5
8957
8958 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8959
8960         * support/regression/tests/float.c: workaround 33 bit hex constant
8961         * support/regression/tests/simplefloat.c: fix division for host
8962
8963 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8964
8965         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8966         that tame's the PIC's over-aggressive optimizer.
8967
8968 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8969
8970          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8971          support for MSVC.
8972
8973 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8974
8975         Initial support for DS80C400. "Hello world" runs on TINIm400
8976         (with polled I/O).
8977
8978 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8979
8980          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8981          * Some notes on ddd usage added in debugger/README
8982          Martin Helmling adding more features and fixes for ddd GUI debugger.
8983          Code added for nexti, stepi, up, down, and other adjustments.
8984
8985 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8986
8987         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8988         * src/pic/peeph.def Added two rules to optimize carry manipulation
8989         * src/pic/* removed debug printfs
8990
8991 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8992
8993         * debugger/mcs51/cmd.c: added header newalloc.h
8994
8995 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8996
8997         * as/Makefile: new EXEEXT
8998         * as/z80/Makefile: remove trailing slash of BUILDIR
8999         * as/z80/clean.mk: new EXEEXT
9000         * Makefile.common.in: add to CFLAGS (and others), don't replace it
9001         * support/cpp2/Makefile.in: new EXEEXT
9002         * src/pic/glue.c (pic14emitRegularMap): fixed warning
9003
9004 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
9005
9006         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
9007         EXEEXT was introduced to fix all related problems with targets
9008         "clean", "install" and "uninstall"; a couple of further flaws
9009         especially with "clean" have been fixed too
9010         * as/mcs51/Makefile.in
9011         * as/mcs51/clean.mk
9012         * as/z80/Makefile
9013         * Makefile
9014         * clean.mk
9015         * debugger/mcs51/Makefile.in
9016         * debugger/mcs51/clean.mk
9017         * link/z80/Makefile
9018         * link/z80/Makefile.in
9019         * link/z80/clean.mk
9020         * link/Makefile
9021         * packihx/Makefile.in
9022         * packihx/clean.mk
9023         * sim/ucsim/Makefile
9024         * sim/ucsim/clean.mk
9025         * sim/ucsim/avr.src/Makefile.in
9026         * sim/ucsim/avr.src/clean.mk
9027         * sim/ucsim/s51.src/Makefile.in
9028         * sim/ucsim/s51.src/clean.mk
9029         * sim/ucsim/xa.src/Makefile.in
9030         * sim/ucsim/xa.src/clean.mk
9031         * sim/ucsim/z80.src/Makefile.in
9032         * sim/ucsim/z80.src/clean.mk
9033         * sim/ucsim/main_in.mk
9034         * sim/ucsim/packages_in.mk
9035         * sim/ucsim/gui.src/Makefile.in
9036         * sim/ucsim/gui.src/serio.src/Makefile.in
9037         * sim/ucsim/gui.src/serio.src/clean.mk
9038         * src/Makefile.in
9039         * src/clean.mk
9040         * support/cpp2/Makefile.in
9041         * support/cpp2/clean.mk
9042         * support/makebin/Makefile
9043         * support/makebin/clean.mk
9044         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
9045         * doc/sdccman.lyx: --program-suffix no longer needed
9046
9047 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9048
9049          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9050          Martin Helmling added support for ddd GUI debugger.
9051          Code added to display assembly, set variables, and other commands
9052          to interface to ddd.
9053
9054 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9055
9056         * as/Makefile: fix target clean
9057         * as/clean.mk: fix target clean
9058         * as/z80/clean.mk: fix target clean
9059
9060 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9061
9062         * Makefile.common.in: added  AT EXEEXT AT
9063         * configure.in: removed all mingw32 stuff
9064         * configure: rebuilt from configure.in
9065         * doc/sdccman.lyx: updated section "installation"
9066         * support/scripts/sdcc_mingw32: adapted to configure
9067         * support/scripts/sdcc_cygwin_mingw32: added
9068
9069 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9070
9071         * src/pic Added object file support for the PIC port
9072         * src/pic Applied patch from Craig Franklin (this started the object file support)
9073         * src/regression Updated the PIC regression tests for object files
9074
9075 2003-04-20  Borut Razem <borut.razem AT siol.net>
9076
9077         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9078           lklex.c: In function `getfid':
9079           lklex.c:203: warning: array subscript has type `char'
9080         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9081           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9082         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9083           stack handling macros
9084
9085 2003-04-19  Borut Razem <borut.razem AT siol.net>
9086
9087         * "handling space characters in file path" task:
9088         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9089         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9090         * support/Util/MySystem.h: make it self-sufficient
9091         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9092           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9093           handling space characters in file path
9094         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9095           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9096         * support/Util/MySystem.c: handling space characters in executable's path
9097
9098 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9099
9100         * as/z80/Makefile: fix permanent rebuild of z80
9101         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9102         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9103
9104 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9105
9106         * src/SDCCopt.c: add special case optimization to replace modulo by
9107           a power of two with a bitwise AND.
9108
9109 2003-04-18    <johan AT balder>
9110
9111         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9112
9113 2003-04-17    <johan AT balder>
9114
9115         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9116         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9117
9118 2003-04-13  Borut Razem <borut.razem AT siol.net>
9119
9120         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9121         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9122           fixed mingw problem in adl_NORMALIZE_PATH
9123
9124 2003-04-12  Borut Razem <borut.razem AT siol.net>
9125
9126         * fixed "#pragma SAVE/RESTORE can not be nested":
9127         * src/SDCC.lex: reworked pragma handling functions
9128         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9129         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9130
9131 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9132
9133         * src/SDCCutil.c (pathEquivalent): defined but not used
9134         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9135         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9136         * configure: rebuilt from configure.in
9137         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9138         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9139         * device/include/Makefile.in: replace sdcc_datadir
9140         * device/lib/Makefile.in: replace sdcc_datadir
9141         * Makefile.common.in: add LDFLAGS from configure
9142         * packihx/Makefile.in: use LDFLAGS
9143         * src/Makefile.in: use LDFLAGS
9144         * support/cpp2/Makefile.in: add LDFLAGS from configure
9145         * support/makebin/Makefile: use LDFLAGS
9146         * .version: bumped version number to 2.3.5
9147
9148 2003-04-12  Borut Razem <borut.razem AT siol.net>
9149
9150         * completed "different paths" task:
9151         * src/SDCCmacro.c: fixed bug in handling quotes
9152         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9153         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9154
9155 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9156
9157         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9158
9159 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9160
9161         * ds390/gen.c ds390/peeph.def: fix bug 706781
9162
9163 2003-04-11  Borut Razem <borut.razem AT siol.net>
9164
9165         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9166
9167 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9168
9169         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9170         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9171          set - this bit used to not be set...).
9172         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9173           bad code in PIC Port
9174         * src/regression/and2.c added to test bug 609268
9175         * src/regression/Makefile added and2.c to regression test
9176
9177
9178 2003-04-08    <johan AT CP255758-A>
9179
9180         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9181         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9182         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9183
9184 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9185
9186         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9187         fix bug #487815
9188         * support/cpp2/Makefile.in: fix bug #487815
9189         * configure: rebuilt from configure.in
9190         * Makefile.common.in: docdir changed, new path suffixes
9191         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9192         * sdcc_vc_in.h: reflect changes from sdccconf.h
9193         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9194         * src/SDCCutil.h: remove BINDIR hack
9195         * doc/sdccman.lyx: update new path hierarchy
9196
9197 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9198
9199         * src/SDCCpeeph.c: added okToRemoveSLOC test
9200
9201 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9202
9203         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9204
9205 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9206
9207         * src/SDCCpeeph.c: added labelIsReturnOnly test
9208         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9209
9210 2003-04-05    <johan AT balder>
9211
9212         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9213         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9214         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9215         * src/SDCCast.c: fixed a warning
9216         * src/SDCCast.h: fixed a warning
9217         * src/SDCCicode.c (operandFromAst): fixed a warning
9218
9219 2003-04-04    <johan AT balder>
9220
9221         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9222         * src/SDCCast.c (decorateType): fixed bug #715076
9223         * src/SDCC.y: fixed bug #702907
9224
9225 2003-04-03    <johan AT balder>
9226
9227         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9228         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9229         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9230         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9231         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9232
9233 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9234
9235         * _decdptr.c: fix return values
9236         * _gptrget.c: fix return values
9237         * _gptrgetc.c: fix return values
9238         * _gptrput.c: fix return values
9239         * _mulint.c: fix return values
9240         * as/z80/Makefile: fix 'make -j' problem
9241
9242 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9243
9244         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9245         * configure.in: big cleanup, updated to autoconf 2.5x
9246         * configure: rebuilt from configure.in
9247         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9248         * sdcc_vc_in.h: reflect changes from sdccconf.h
9249         * doc/Makefile: fixed a flaw in "make install"
9250
9251 2003-04-02    <johan AT balder>
9252
9253         * src/ds390/gen.c (genCmp): no comments
9254         * src/mcs51/gen.c (genCmp): no comments
9255         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9256         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9257
9258 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9259
9260         * support/regression/generate-cases.py: place generated file in given sub directory
9261         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9262         * support/regression/Makefile: improvements for 'make -j';
9263         side effect: it's simpler and faster now
9264
9265 2003-03-31  Borut Razem <borut.razem AT siol.net>
9266
9267         * src/z80/main.c: link-{port} and as-{port} defined without path
9268         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9269
9270 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9271
9272         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9273
9274 2003-03-30  Borut Razem <borut.razem AT siol.net>
9275
9276         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9277           changed type of list parameter to set
9278         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9279         * src/port.h: changed type of do_assemble() parameter to set
9280         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9281           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9282           definition of "cppoutfilename" macro with NULL value in preProcess()
9283         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9284         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9285         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9286           replaced with set *binPathSet
9287         * shash_add() deallocates the item, if allready exsists, before adding the new one
9288         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9289
9290 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9291
9292         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9293           a nested for loop bug in the PIC port
9294         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9295           for loops
9296
9297 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9298
9299         * support/Util/dbuf.h: remove C++ stuff to make it portable
9300
9301 2003-03-28  Borut Razem <borut.razem AT siol.net>
9302
9303         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9304           literal strings in stringLiteral()
9305         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9306         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9307           to the project
9308
9309 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9310
9311         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9312
9313 2003-03-26    <johan AT balder>
9314
9315         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9316         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9317         * src/SDCCast.c (decorateType): fixed " -v < 3"
9318
9319 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9320
9321         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9322         Added Lenny Story's debug infrastructure changes:
9323         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9324         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9325         * src/cdbFile.c: added
9326         * src/SDCCdebug.c: added
9327         * src/SDCCdebug.h: added
9328         * src/SDCCast.c (createFunction)
9329         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9330         * src/SDCCmain.c (parseCmdLine, main)
9331         * src/SDCCmem.c (redoStackOffsets)
9332         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9333         * src/SDCCsymt.h
9334         * src/common.h
9335         * src/avr/gen.c (genAVRCode)
9336         * src/ds390/gen.c (gen390Code)
9337         * src/mcs51/gen.c (gen51Code)
9338         * src/pic/gen.c (genpic14Code)
9339         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9340         * src/xa51/gen.c (genXA51Code)
9341         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9342
9343 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9344
9345         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9346         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9347
9348 2003-03-22    <johan AT balder>
9349
9350         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9351
9352 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9353
9354         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9355         * doc/cdbfileformat.lyx: added, written by Lenny Story
9356         * doc/Makefile: added cdbfileformat.lyx
9357         * doc/clean.mk: added cdbfileformat.lyx
9358
9359 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9360
9361         * src/mcs51/peeph.def: fix bug #705773
9362
9363 2003-03-20    <johan AT balder>
9364
9365         An sfr/sbit can have an "at #" AND an initializer
9366         * src/SDCCsymt.c (checkSClass):
9367         * src/SDCCmem.c (allocGlobal):
9368         * src/SDCCmem.c (allocLocal):
9369         * src/SDCCast.c (createBlock):
9370
9371 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9372
9373         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9374
9375 2003-03-16    <johan AT balder>
9376
9377         Undid the hackup of const and volatile, the problem is much bigger
9378         * src/SDCC.y:1.65
9379         * src/SDCCast.c:1.171
9380         * src/SDCCglue.c:1.138
9381         * src/SDCCicode.c:1.146
9382         * src/SDCCsymt.c:1.150
9383         * src/SDCCval.c:1.65
9384
9385 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9386
9387         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9388         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9389
9390 2003-03-13    <johan AT balder>
9391
9392         Hackup const and volatile modifiers in type chains a bit:
9393         * src/SDCC.y:1.63
9394         * src/SDCCast.c:1.169
9395         * src/SDCCglue.c:1.136
9396         * src/SDCCicode.c:1.143
9397         * src/SDCCsymt.c1.146
9398         * src/SDCCsymt.h1.59
9399         * src/SDCCval.c:1.63
9400
9401 2003-03-12    <johan AT balder>
9402
9403         * src/SDCCBBlock.h: more LRH debugging junk
9404         * src/SDCCcflow.h: more LRH debugging junk
9405         * src/SDCCloop.c: more LRH debugging junk
9406         * src/SDCC.y (struct_declaration): fixed bug #697590
9407         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9408         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9409         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9410
9411 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9412         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9413         test function names must now match exactly).
9414         * src/SDCCcse.c: added special case in findCheaperOp to allow
9415         extending a short integer. Makes less awful code for bug 700121 test case.
9416
9417 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9418
9419         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9420         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9421
9422 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9423
9424         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9425         actually called (operandsNotEqual() was called for all
9426         operandsNotEqualX tests).
9427
9428 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9429
9430         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9431         with shorter literals. Fixes bug 700121.
9432
9433 2003-03-11    <johan AT balder>
9434
9435         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9436
9437 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9438
9439         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9440         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9441
9442 2003-03-10  Borut Razem <borut.razem AT siol.net>
9443
9444         * src/SDCCmain.c: pipe preprocessor's output
9445         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9446         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9447         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9448         which closes all pipes in pipeSet set
9449         * src/SDCCset.c: free deleted item in function deleteSetItem()
9450         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9451         moved from z80 to src subproject
9452         * .version: increased version number to 2.3.4
9453
9454 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9455
9456         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9457         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9458         * support/regression/ports/xa51/spec.mk: fix typo
9459
9460 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9461
9462         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9463
9464 2003-03-09  Borut Razem <borut.razem AT siol.net>
9465
9466         * src/SDCCmain.c: pipe preprocessor's output
9467         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9468         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9469         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9470         which closes all pipes in pipeSet set
9471         * src/SDCCset.c: free deleted item in function deleteSetItem()
9472         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9473         moved from z80 to src subproject
9474
9475 2003-03-09  Borut Razem <borut.razem AT siol.net>
9476
9477         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9478         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9479         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9480         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9481         * src/SDCCglobl.h: unification of WIN32 native definitions
9482
9483 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9484
9485         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9486
9487 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9488
9489         * src/configure.in:   check for endianess (even while cross-compiling)
9490         * src/configure:      check for endianess (even while cross-compiling)
9491         * src/configure_in.h: check for endianess (even while cross-compiling)
9492         * src/avr/gen.c:        remove old endianess stuff
9493         * src/mcs51/gen.c:      remove old endianess stuff
9494         * src/ds390/gen.c:      remove old endianess stuff
9495         * src/pic/gen.c:        remove old endianess stuff
9496         * src/pic/genarith.c:   remove old endianess stuff
9497         * src/pic/glue.c:       fix endianess check
9498         * src/pic16/gen.c:      remove old endianess stuff
9499         * src/pic16/genarith.c: remove old endianess stuff
9500         * src/pic16/glue.c:     fix endianess check
9501         * src/xa51/gen.c:       remove old endianess stuff
9502         * src/z80/gen.c:        fix endianess check
9503         * src/SDCCglue.c:       fix endianess check
9504         * src/ds390/peeph.def: fix bug 700036
9505
9506 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9507
9508         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9509         * src/configure: find appropriate data-types on host for SDCC's int and long
9510         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9511         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9512         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9513
9514 2003-03-07    <johan AT balder>
9515
9516         Just a big NOOP:
9517                 some minor cleanups before the big shot
9518                 OP_DEFS and OP_USES now use Kevin's protection
9519                 new option --nolabelopt
9520
9521         * src/SDCCBBlock.c:
9522         * src/SDCCast.c,:
9523         * src/SDCCcflow.c:
9524         * src/SDCCcse.c:
9525         * src/SDCCicode.c:
9526         * src/SDCCicode.h:
9527         * src/SDCClabel.c:
9528         * src/SDCCloop.c:
9529         * src/SDCCmain.c:
9530         * src/ds390/ralloc.c:
9531         * src/mcs51/ralloc.c:
9532         * src/pic/ralloc.c:
9533         * src/xa51/ralloc.c:
9534         * src/z80/ralloc.c:
9535
9536 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9537
9538         * src/pic/pcode.c (get_op): fix 64 bit warnings
9539         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9540         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9541         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9542         * support/regression/tests/malloc.c: fix 64 bit warnings
9543
9544 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9545
9546         * src/mcs51/gen.c (genMinus): fixed bug 696436
9547
9548 2003-03-02  Borut Razem <borut.razem AT siol.net>
9549
9550         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9551
9552 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9553
9554         * configure.in: test for mkstemp
9555         * sdccconf_in.h: add HAVE_MKSTEMP
9556
9557 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9558
9559         * device/include/ctype.h: removed warning while using --stack-auto
9560         * device/include/malloc.h: removed warning while using --stack-auto
9561         * device/include/string.h: removed warning while using --stack-auto
9562
9563 2003-02-23  Borut Razem <borut.razem AT siol.net>
9564
9565         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9566         because NDEBUG is defined (see man assert)
9567         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9568
9569 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9570
9571         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9572         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9573
9574 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9575
9576         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9577         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9578
9579 2003-02-18    <johan AT balder>
9580
9581         * as/mcs51/asmain.c (asmbl): module can start with a digit
9582         * as/z80/asmain.c (asmbl): module can start with a digit
9583
9584 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9585
9586         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9587         * src/asm.c: fix pipe() for Mingw32
9588
9589 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9590
9591         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9592         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9593         make -V work again; --c1mode reads now from stdin
9594         * doc/sdccman.lyx: added --c1mode
9595         * support/Util/SDCCerr.c: new messages for c1 mode
9596         * support/Util/SDCCerr.h: new messages for c1 mode
9597         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9598
9599 2003-02-15    <johan AT balder>
9600
9601         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9602
9603 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9604
9605         * doc/sdccman.lyx: Environment variables, -o and other minor things
9606
9607 2003-02-14    <johan AT balder>
9608
9609         * src/xa51/main.c: before anyone really tries to use it :)
9610
9611         * Install doc's in share/sdcc/doc
9612         * removed some obsolete files
9613         * Do a proper make distclean and uninstall
9614         M Makefile.common.in
9615         R sdccbuild.sh
9616         M as/Makefile
9617         M device/include/Makefile.in
9618         M device/lib/Makefile.in
9619         M doc/sdccman.lyx
9620         M link/Makefile
9621         M sim/ucsim/doc/Makefile.in
9622         M src/clean.mk
9623         R src/avr/peeph.rul
9624         R src/xa51/peeph.rul
9625         M support/cpp2/Makefile.in
9626         M support/makebin/Makefile
9627
9628
9629 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9630
9631         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9632
9633 2003-02-10  Borut Razem <borut.razem AT siol.net>
9634
9635         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9636         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9637         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9638         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9639         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9640         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9641         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9642         src/z80/Makefile.bcc: Borland Makefile cleanup
9643         * as/z80/Makefile.bcc: Added Borland Makefile
9644         * support/cpp2/borland.h: Removed
9645
9646 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9647
9648         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9649         * src/SDCC.lex: new pragma NOIV
9650         * src/SDCCglobl.h: new pragma NOIV
9651         * src/SDCCmem.c: new pragma NOIV
9652
9653 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9654
9655         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9656
9657 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9658
9659         * src/SDCCmain.c: signal handling is switched off by --debug
9660         * doc/Makefile: small fix for install; use clean.mk again
9661         * doc/clean.mk: clean *.pdf and *.html too
9662
9663 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9664
9665         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9666         * device/lib/printfl.c: fix a ds390 bug by making it portable
9667         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9668         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9669         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9670         * debugger/mcs51/cmd.c: converted multi-line string literals
9671         * sim/ucsim/globals.cc: converted multi-line string literals
9672         * src/SDCCmain.c: introduced signal handler to remove temp files
9673         * doc/Makefile: small tweaks, implement clean
9674         * doc: removed generated files
9675
9676 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9677
9678         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9679         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9680         Address Record is not correctly generated for DS390."
9681
9682 2003-02-02  Borut Razem <borut.razem AT siol.net>
9683
9684         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9685         * as/mcs51/asm.h: fixed compilation with Borland C
9686         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9687         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9688         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9689         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9690         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9691         src/z80/Makefile.bcc: delete $(LIB) only if exist
9692         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9693
9694 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9695
9696         * device/include/malloc.h: introduced NULL
9697         * device/include/string.h: introduced NULL
9698         * device/include/stdlib.h: introduced NULL
9699         * device/lib/_memcpy.c: removed NULL
9700         * device/lib/_strcat.c: removed NULL
9701         * device/lib/_strchr.c: removed NULL
9702         * device/lib/_strcmp.c: removed NULL
9703         * device/lib/_strcpy.c: removed NULL
9704         * device/lib/_strcspn.c: removed NULL
9705         * device/lib/_strlen.c: removed NULL
9706         * device/lib/_strncat.c: removed NULL
9707         * device/lib/_strncmp.c: removed NULL
9708         * device/lib/_strncpy.c: removed NULL
9709         * device/lib/_strpbrk.c: removed NULL
9710         * device/lib/_strrchr.c: removed NULL
9711         * device/lib/_strspn.c: removed NULL
9712         * device/lib/_strstr.c: removed NULL
9713         * device/lib/_strtok.c: removed NULL
9714         * device/lib/malloc.c: removed NULL, include own header
9715
9716 2003-02-02    <johan AT balder>
9717
9718         * 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
9719         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9720         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9721         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9722         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9723         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9724
9725 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9726
9727         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9728         area 'DATA'"
9729
9730 2003-02-01    <johan AT balder>
9731
9732         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9733
9734 2003-01-31    <johan AT CP255758-A>
9735
9736         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9737
9738 2003-01-30    <johan AT balder>
9739
9740         * src/SDCCBBlock.c: automatic bug detection
9741         * src/SDCCicode.c: automatic bug detection
9742
9743 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9744
9745         * src/SDCCglobl.h:   now --xram-size 0 works
9746         * src/SDCCmain.c:    now --xram-size 0 works
9747
9748 2003-01-29    <johan AT balder>
9749
9750         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9751
9752 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9753
9754         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9755         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9756         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9757         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9758         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9759         * src/SDCCmain.c:    Added options --xram-size and --code-size
9760
9761 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9762
9763         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9764         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9765
9766 2003-01-27    <johan AT balder>
9767
9768         * src/SDCC.y: fixed bug #613764
9769
9770 2003-01-26    <johan AT balder>
9771
9772         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9773         * src/SDCCsymt.h: fixed bug #673374
9774         * src/SDCCglue.c: fixed bug #661910
9775         * src/SDCCast.c: fixed bug #458099 and 673374
9776
9777 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9778
9779         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9780         * as/mcs51/strcmpi.h: added
9781         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9782         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9783         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9784         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9785         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9786         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9787         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9788         * as/mcs51/Makefile.aslink: new module strcmpi
9789         * as/mcs51/Makefile.asx8051: new module strcmpi
9790         * as/mcs51/Makefil.bcc: new module strcmpi
9791         * as/mcs51/Makefile.in: new module strcmpi
9792         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9793
9794 2003-01-26    <johan AT balder>
9795
9796         * src/SDCCglue.c: reverted back to 1.124
9797         * src/SDCCast.c: reverted back to 1.156
9798         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9799
9800 2003-01-25    <johan AT balder>
9801
9802         * src/SDCCglue.c: A better fix for bug #661910
9803         * src/SDCCast.c: A better fix for bug #661910
9804         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9805
9806 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9807
9808         * src/Makefile.in: remove spawn.o
9809         * src/SDCCmain.c: remove spawn.h
9810         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9811         * src/spawn.c: removed
9812         * src/spawn.h: removed
9813         * support/regression/ports/ds390/spec.mk: link with -r
9814
9815 2003-01-24    <johan AT CP255758-A>
9816
9817         * src/ds390/gen.c (aopOp): fixed bug #667458
9818         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9819         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9820         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9821
9822 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9823
9824         * src/mcs51/peeph.def: better assembler identation by Frieder
9825         * src/mcs51/gen.c: better assembler identation by Frieder
9826
9827 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9828
9829         * as/z80/string.h: removed for gcc 3.2
9830         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9831         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9832
9833 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9834
9835         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9836         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9837         * support/regression/Makefile: separate temp files for ports
9838         * support/regression/generate-cases.py: separate temp files for ports
9839         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9840         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9841
9842 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9843
9844         * moved tinitalk to device/examples/ds390
9845
9846 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9847
9848         * as/mcs51/lkmem.c: rflag is for DS390
9849         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9850         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9851                          (linkEdit): move mem- and map-files the same way as ihx-files
9852         * src/z80/main.c (_setDefaultOptions): removed --generic
9853         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9854         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9855         * src/pic/glue.c (picglue): --c1mode works again
9856         * src/pic16/glue.c (pic16glue): --c1mode works again
9857         * src/asm.c (printCLine): fix #660034
9858
9859 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9860
9861         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9862         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9863         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9864         * as/mcs51/lkmem (summary): better fix for sp problem
9865         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9866         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9867         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9868                                               remove --stack-after-data
9869
9870 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9871
9872         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9873         * src/SDCCutil.c (join): ugly bug: missing '\0'
9874         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9875
9876 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9877
9878         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9879         * src/port.h: typo
9880         * src/pic/main.c (_asmCmd): gpasm supports -o
9881         * src/z80/main.c: more general macros
9882         * device/lib/Makefile.in: remove intermediate files
9883
9884 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9885
9886         * .version: Bumped version number to 2.3.3
9887         * src/SDCCBBlock.c: new option -o
9888         * src/SDCCglobl.h: new option -o
9889         * src/SDCCglue.c: new option -o
9890         * src/SDCCmain.c: new option -o
9891         * src/asm.c: new option -o
9892         * src/ds390/main.c: new option -o
9893         * src/pic/glue.c: new option -o
9894         * src/pic/pcode.c: new option -o
9895         * src/pic/ralloc.c: new option -o
9896         * src/pic16/glue.c: new option -o
9897         * src/pic16/pcode.c: new option -o
9898         * src/pic16/ralloc.c: new option -o
9899         * src/z80/main.c: new option -o
9900         * device/lib/Makefile.in: use -o
9901         * support/regression/ports/ds390/spec.mk: use -o
9902         * support/regression/ports/gbz80/spec.mk: use -o
9903         * support/regression/ports/mcs51/spec.mk: use -o
9904         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9905         * support/regression/ports/z80/spec.mk: use -o
9906         * support/regression/ports/ucz80/spec.mk: use -o
9907         * support/regression/ports/xa51/spec.mk: use -o
9908         * support/regression/fwk/lib/timeout.c: fix usage string
9909
9910 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9911         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9912
9913 2003-01-07    <johan AT balder>
9914
9915         * src/SDCCast.c (decorateType): fixed bug #600035
9916
9917 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9918         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9919         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9920         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9921         * src/pic/pcode.c: outcommented unused variable to remove warnings
9922         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9923
9924 2003-01-06    <karl AT turbobit.com>
9925         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9926    regression tests.
9927
9928 2003-01-06    <johan AT balder>
9929
9930         * src/SDCCicode.c: fixed array add
9931
9932 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9933         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9934         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9935
9936 2003-01-04    <johan AT balder>
9937
9938         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9939
9940 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9941         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9942
9943 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9944         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9945         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9946
9947 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9948         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9949
9950 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9951         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9952
9953 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9954         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9955
9956 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9957
9958     * in \sdcc\as\mcs51\ changed these files in order to create an
9959     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9960     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9961     following files to include the previous two files: aslink.dsp,
9962     Makefile.aslink, Makefile.bcc, and Makefile.in.
9963
9964     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9965     .adb instead of .cdb
9966
9967 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9968
9969         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9970         value from option --iram-size.
9971
9972 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9973
9974         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9975         dram[] array.
9976
9977 2002-09-18    <wiml AT hhhh.org>
9978
9979         * SDCClrange.h: exposed setFromRange() and setToRange()
9980         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9981           packRegsForAccUse() (bug 542397)
9982         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9983           multiple times and emitting the fetch operations more than once
9984           added aopGetUsesAcc() function to allow binary operators to
9985           fetch their operands in the correct order; made genMinus() emit
9986           compact code for X = LITERAL - Y
9987
9988 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9989         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9990         sprintf() in line 1267.
9991
9992 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9993         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9994         like ports.
9995
9996 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9997         Changes to aslink (All the changes are marked with 'JCF'):
9998
9999         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
10000         summary().
10001
10002         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
10003         area BSEG.  Also moves, if possible, the DATA area down into the internal
10004         ram so more space is available.
10005
10006         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
10007         sflag.
10008
10009         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
10010         not bytes.  Function summary() which creates a memory usage summary
10011         file with extension .mem.  Reports of overlaping stack and small stack
10012         size.  If the space for the stack is less than 16 bytes aslink trows a
10013         warning.
10014
10015         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
10016         the 8051.  Option 'y' for memory summary output file.
10017
10018         Changes to sdcc (All the changes are marked with 'JCF'):
10019
10020         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
10021
10022         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
10023         overlaying area for it (uses RegBankUsed[4]).
10024
10025         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
10026         bank zero as used by default.  By default aslink locates the stack
10027         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
10028         the creation of the .mem file.  Delegates the allocation of data area
10029         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
10030         the begining of the stack area to aslink.
10031
10032         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
10033         glue() in SDCCglue.c creates an area for it.
10034
10035 2002-09-03  Borut Razem <borut.razem AT siol.net>
10036         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
10037         sdcc/src/pic/glue.c:
10038         introduced atexit() handler for teporay files removal in case of
10039         errors, assertions, ...
10040
10041 2002-08-29  Borut Razem <borut.razem AT siol.net>
10042         * sdcc/support/cpp2/auto-host_vc_in.h:
10043         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
10044         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
10045         Maybe there is a similar problem with BORLANDC? It should be checked!
10046
10047         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10048         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10049         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10050         was not executed, and the compiler (cl) launched a warning:
10051         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10052
10053 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10054         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10055
10056 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10057         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10058
10059         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10060           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10061           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10062           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10063           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10064           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10065           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10066         - added Release configuration in VS projects
10067         - review of compiler an linker options
10068         - VC .exe files are generated in bin_vc directory, not to interfere
10069           with binaries generated from other projects (cygwin, mingw, bcc ...)
10070
10071         * sdcc/src/yacc.dsp: added
10072
10073         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10074         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10075         and insert the version number definitions from .version
10076
10077         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10078
10079         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10080         added - genarate auto-host.h using auto-host_vc_in.h as template
10081
10082         * sdcc/sdcc_vc.h,
10083         removed from CVS, generated automatically
10084
10085 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10086         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10087
10088 2002-08-11  Borut Razem <borut.razem AT siol.net>
10089         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10090
10091 2002-08-10  Borut Razem <borut.razem AT siol.net>
10092         * src/SDCCmain.c (main):
10093         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10094         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10095         The consequence was that some temporary files were not removed.
10096
10097         * src/SDCCglue.c:
10098         unification of code in functions tempfilename() and tempfile():
10099         function tempnam() is defined in Visual Studio 6.0 and .NET
10100
10101         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10102
10103         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10104           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10105         - removed compiler command line option /WX: Treats all warnings as errors
10106         - update a list of source files, included into the project
10107
10108         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10109           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10110         changed project type to Generic Project so that can be correcly converted to VS.NET project
10111
10112         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10113
10114         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10115
10116         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10117
10118         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10119         added return 0 statements after assert() to make compiler happy
10120
10121         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10122         added newline in the def file to keep MSC compiler satisfied
10123
10124         * sdcc/src/z80/gen.c:
10125         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10126           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10127         - solved MSC error in function aopDump()
10128
10129         * sdcc_vc.h: define PREFIX as "\\sdcc"
10130
10131 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10132         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10133
10134 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10135         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10136         - Rewrote the register banking algorithm.
10137         - Added pCode live-range analysis to registers (for now, only non-used and
10138         singly-used registers optimized away)
10139
10140         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10141
10142         * 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.
10143
10144 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10145         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10146
10147 2002-04-22  Michael Hope  <michaelh AT vroom>
10148
10149         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10150
10151         * configure.in (DD_COPT): Added include support required for gbdk.
10152
10153         * .version: Bumped version number just to increase it.
10154
10155         * src/SDCCmain.c: Added -nostdinc to the default options.
10156
10157 2002-04-15  Michael Hope  <michaelh AT vroom>
10158
10159         * device/lib/z80/printf.c (sprintf): Added.
10160
10161         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10162
10163         * src/z80/peeph.def: Added transpose redundent load rule.
10164
10165         * src/z80/main.c: Added force callee saves for jaune.
10166
10167         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10168
10169         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10170
10171 2002-03-28  Johan Knol  <johan AT balder>
10172
10173         * src/SDCCval.c: fixed bug #532436
10174
10175 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10176         * /src/port.h:
10177         Added "char *Processor" field to the port structure.
10178
10179         * /src/SDCCmain.c:
10180         Added -p option. Allows port dependent processor to be specified.
10181
10182         * all ports:
10183         Initialized the new field char *Processor field to NULL in all ports
10184
10185         * /src/pic/*:
10186         Compiler generated registers for interrupt context saving
10187         were not getting allocated.
10188
10189 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10190
10191         * /src/SDCCast.c:
10192         Fixed left shift. Will promote the left side of a left shift
10193         if a) left shifting more than size of operand or b) when assigned
10194         to something size > size of left side
10195
10196 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10197         * src/pic/*
10198         tons of changes. Register allocation has been
10199         rewritten. Added customization for the various PICs. Flow
10200         analysis is restructured. ...
10201
10202         * src/pic/device.h:
10203         Added
10204
10205         * src/pic/device.c:
10206         Added. device.c is a PIC port hack to accomodate variations
10207         in PIC devices.
10208
10209 2002-03-13  Michael Hope  <michaelh AT vroom>
10210
10211         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10212
10213 2002-03-04  johanknol  <johanknol AT manik>
10214
10215         * /src/SDCCval.c: fixed
10216
10217         const unsigned char arr[][2] = { { 0, 1 } };
10218         t18.c:1: error: Initializer element is not constant
10219
10220 2002-03-04  bela  <bela AT manik>
10221
10222         * /device/include/mcs51reg.h:
10223         ds89c420 register definition update
10224
10225 2002-03-03    <johan AT FRIJA>
10226
10227         * support/Util/SDCCerr.c: did something, but don't no why anymore
10228
10229         * support/regression/tests/bug-524691.c: made it a little less shy
10230
10231         * src/SDCCast.c (decorateType): fixed bug #524697
10232
10233         * src/SDCCast.c: made some lineno improvements
10234
10235         * src/SDCCval.c (getNelements): changed warning to error
10236
10237         * src/SDCCglue.c (printIvalArray): changed warning to error
10238
10239         * src/SDCCicode.c: fixed a warning for mingw
10240
10241         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10242
10243         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10244
10245 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10246
10247         * src/ds390/peeph.def:
10248         Added some more peephole rules
10249
10250         * src/ds390/gen.c: Various fixes & enhancements
10251
10252         * src/SDCClrange.c, src/SDCClrange.h:
10253         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10254
10255         * src/ds390/ralloc.c:
10256         various fixes & enhancements (ds390) specific
10257
10258         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10259         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10260         from rallocs.
10261
10262         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10263
10264 2002-03-02    <johan AT FRIJA>
10265
10266         * src/SDCCast.c (decorateType): fixed bug #524708
10267
10268         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10269
10270         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10271
10272 2002-03-01  Michael Hope  <michaelh AT vroom>
10273
10274         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10275
10276         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10277
10278 2002-03-01    <johan AT FRIJA>
10279
10280         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10281
10282         * src/SDCCast.c (decorateType): fixed bug #524209
10283
10284         * src/SDCCval.c (valNot): fixed bug #524195
10285
10286 2002-02-26    <johan AT balder>
10287
10288         * src/xa51/gen.c: fixed a warning
10289
10290         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10291
10292         * src/SDCCast.c (decorateType): fixed bug #522534
10293
10294 2002-02-23    <johan AT balder>
10295
10296         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10297
10298 2002-02-22    <johan AT balder>
10299
10300         * src/SDCCast.c: fixed bug #514865
10301
10302         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10303
10304 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10305
10306         * sdcc/src/SDCCloop.c:
10307         Previous fix was not good. basic blocks that have "break" or "return" are
10308         not really partof a loop , but live ranges used in these blocks should
10309         be live thru the entire loop, so set partOfLoop but don't add them to
10310         loop region
10311
10312 2002-02-21    <johan AT FRIJA>
10313
10314         * src/SDCCcse.c: fixed bug #514308
10315
10316 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10317
10318         * src/SDCCloop.c:
10319         Fixed BUG #519583. If a conditional block ended in a return/break
10320         statement inside a loop, it was not being considered part of the loop.
10321
10322         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10323
10324 2002-02-10  Karl Bongers <karl AT turbobit.com>
10325
10326         * debugger/*:
10327         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10328         with lots of comments and notes.
10329
10330         * device/examples/test2.c:
10331         Fix bug, "red" variable not being initialized(compiler complained).
10332
10333         * device/examples/Makefile, examples/test3.c:
10334         Add Makefile in device/examples folder, compiles test3.c
10335         for use as a multiple module SDCDB test case.
10336
10337         * sim/ucsim/cmd.src/cmdset.cc:
10338         Took out debug printfs in ucsim "next" command.
10339
10340         * sim/ucsim/xa.src:
10341         Karl and Johan start ucsim XA support.  Most dissassembly working,
10342         about 75% emulation done(plenty of work remaining).
10343
10344         * sim/ucsim/z80.src:
10345         Add Z80 support to ucsim, add test-ucz80 regression test,
10346         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10347         Notice z80 compiler fails on examples/test3.c/crc code.
10348
10349 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10350
10351         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10352         Added support for --parms-in-bank1
10353
10354         * src/ds390/peeph.def:
10355         added a few more peephole optimzations
10356
10357         * src/ds390/main.c:
10358         1) added __builtin_inp & __builtin_outp used to read in data of given length
10359            from a memory mapped port
10360         2) added __builtin_memcmp
10361         3) added __builtin_swapw swap bytes of a short
10362
10363         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10364         1) handle multiple send & receives from register bank1
10365         2) ralloc can now allocate DPTR1 to some liveRanges
10366
10367         * src/SDCCsymt.c, src/SDCCsymt.h:
10368         changes to handle multiple sends & receives
10369
10370         * src/SDCCptropt.h:
10371         added some pointer arithmetic optimization
10372
10373         * src/SDCCptropt.c:
10374         added some pointer arithmetic optimizations but not stable yet so not
10375         called from anywhere (will get this working shortly)
10376
10377         * src/SDCCopt.c: fixed for multiple sends & receives
10378
10379         * src/SDCCmain.c:
10380         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10381         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10382            set preprocessor defines (depending on options)
10383
10384         * src/SDCCicode.c, src/SDCCicode.h:
10385         changes made to handle multiple sends & receives
10386
10387         * src/SDCCglobl.h:
10388         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10389
10390         * src/SDCCcse.c, src/SDCCcse.h:
10391         added function findbackward def (to be used in upcoming optimization)
10392
10393         * src/SDCCcflow.c, src/SDCCcflow.h:
10394         added function returnAtEnd - to determine if a basic block terminates with
10395         a RETURN iCode
10396
10397         * src/SDCCast.c, src/SDCCast.h:
10398         added option parms-in-bank1
10399
10400         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10401         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10402         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10403         adjusted for --parms-in-bank1 option
10404
10405         * device/include/string.h:
10406         donot redefine "reentrant" keyword
10407
10408         * device/include/ds80c390.h: Added some more SFRs
10409
10410 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10411
10412         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10413
10414 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10415
10416         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10417
10418 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10419
10420         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10421
10422 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10423
10424         * Added --xram-movc option
10425
10426 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10427
10428         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10429
10430 2002-01-11  Johan Knol
10431
10432         * Added math lib of Jesus Calvino-Fraga
10433
10434 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10435
10436         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10437         * support/regression/Makefile: new target test-mcs51-stack-auto
10438         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10439
10440 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10441
10442         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10443
10444 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10445
10446         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10447
10448 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10449
10450         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10451
10452         * src/SDCCglue.h: add definition for printIvalChar()
10453
10454 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10455
10456         * src/SDCCast.c: fix #498138 by Johan
10457
10458         * src/SDCCglue.c: fix #498138 by Johan
10459
10460 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10461
10462         * support/regression/Makefile: fix clean
10463
10464         * support/regression/ports/ds390/support.c: fix transmission of last character
10465
10466 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10467
10468         * /sdcc/src/ds390/gen.c:
10469         a) improved computing address of stack variable
10470         b) took out some #if 0 code
10471         c) improved parmBytes adjustment
10472         d) improved genPlusIncr & genMinusIncr
10473         e) genCmp could generate bad code (when left assigned to DPTR)
10474         f) Fixed bug in hasInc
10475
10476         * /sdcc/src/ds390/ralloc.c:
10477         a) packRegsForSupport could mess up live information (Fixed)
10478         b) packRegsDPTRuse could be incorrect for left & right shift
10479
10480         * /sdcc/src/mcs51/ralloc.c:
10481         packRegsForSupport could mess up the live information (Fixed)
10482
10483         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10484
10485         * /sdcc/src/SDCCast.c:
10486         can reverse a loop even if function call is present as long
10487         as the loop control variable is local & is not passed as parameter
10488
10489 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10490
10491         * /sdcc/ChangeLog: *** empty log message ***
10492
10493         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10494         More builtin function additions for TININative
10495
10496         * /sdcc/src/ds390/ralloc.c:
10497         Had broken the regression testsuite
10498
10499         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10500
10501         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10502         Added funcattr hasStackParms will be set for reentrant functions when there
10503         are paramteres on the stack, this helps in minimizing frame pointer generation
10504         typeFromStr can handle function pointers now
10505
10506         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10507         *** empty log message ***
10508
10509 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10510
10511         * /src/ds390/gen.c, /src/ds390/main.c:
10512         More builtin function additions for TININative
10513
10514         * /src/ds390/ralloc.c:
10515         Had broken the regression testsuite
10516
10517         * /src/SDCCast.c: Fixed a bug in dumptree
10518
10519         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10520         Added funcattr hasStackParms will be set for reentrant functions when there
10521         are paramteres on the stack, this helps in minimizing frame pointer generation
10522         typeFromStr can handle function pointers now
10523
10524         * /doc/builtins.txt, /doc/TININative.txt:
10525         *** empty log message ***
10526
10527
10528 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10529
10530         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10531         ALPHA version for -mTININative
10532
10533         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10534         updated to reflect changes in the port structure
10535
10536         * /src/port.h:
10537         added function do_assemble (similar to do_link) if non-null this function
10538         will be called to do assembly (-mTININative) requires a multi command
10539         assembly
10540         added function genAssemblerEnd will be called to generate assembler Epilogue
10541
10542         * /src/SDCCsymt.c:
10543         added _JavaNative to debug info printing
10544
10545         * /src/SDCCmain.c: added option --tini-libid
10546         added port->do_assemble function (-mTININative) has a multi command assemble
10547
10548         * /src/SDCCglue.c: Disabled "constExpr" check
10549         added port->genAssemblerEnd function
10550
10551         * /src/SDCCglobl.h: Added option --tini-libid value
10552
10553         * /src/SDCCast.h:
10554         tookout optimizeCompare from the header (has no external references)
10555
10556         * /src/SDCCast.c: made one more function "static"
10557
10558 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10559
10560         * src/z80/mappings.i: Added z80asm support.
10561
10562         * src/z80/main.c: Added z80asm support on --asm=z80asm
10563
10564         * src/z80/gen.c: Fixed asm portability issues.
10565
10566         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10567
10568         * src/SDCCglue.c (printExterns): Added global/extern split.
10569
10570 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10571
10572         * support/regression/Makefile: added test for mcs51 model large
10573
10574         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10575
10576         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10577
10578 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10579
10580         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10581
10582 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10583
10584         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10585
10586         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10587
10588 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10589
10590         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10591
10592         * support/regression/tests/simplefloat.c: Port to mcs51.
10593
10594 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10595         * support/regression/tests/bug-485362.c: Added.
10596
10597         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10598
10599         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10600
10601         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10602
10603         * src/z80/gen.c (aopDump): Added a dump function.
10604
10605 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10606         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10607
10608         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10609
10610         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10611
10612         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10613
10614         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10615
10616         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10617
10618         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10619
10620         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10621
10622         * support/regression/ports/ds390/support.c: Use tinibios.
10623
10624         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10625
10626 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10627
10628         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10629         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10630
10631         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10632
10633         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10634
10635 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10636
10637         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10638
10639         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10640         (packRegsForIYUse): Created and optimised.
10641
10642 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10643
10644         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10645 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10646
10647         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10648
10649         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10650
10651         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10652
10653 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10654
10655         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10656
10657         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10658
10659 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10660
10661         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10662
10663         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10664
10665         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10666
10667 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10668
10669         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10670         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10671         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10672
10673         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10674
10675         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10676         (genNotFloat): Added.
10677         (genUminusFloat): Added.
10678
10679         * device/lib/z80/Makefile: Added floating pt stubs.
10680
10681         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10682
10683         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10684
10685         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10686
10687 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10688
10689         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10690
10691         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10692
10693         * sdcc/support/regression/Makefile: Add port ds390.
10694
10695         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10696
10697         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10698
10699         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10700
10701         * sdcc/support/regression/ports/ds390/support.c: Added.
10702
10703         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10704
10705         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10706
10707         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10708
10709 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10710
10711         * device/include/malloc.h: Added z80 and gbz80 support.
10712
10713         * device/lib/gbz80/heap.s: Added.
10714
10715         * device/lib/z80/heap.s: Added.
10716
10717         * device/lib/malloc.c: Added z80 and gbz80 support.
10718
10719         * support/regression/tests/malloc.c (testMalloc): Added.
10720
10721         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10722
10723         * support/regression/tests/bug-478094.c: Added.
10724
10725         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10726
10727 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10728
10729         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10730
10731         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10732
10733         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10734
10735         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10736
10737         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10738
10739 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10740
10741         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10742
10743 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10744
10745         * support/regression/tests/bug-477927.c: Added.
10746
10747         * src/z80/peeph.def: Added minor rules.
10748
10749         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10750
10751         * src/z80/peeph.def: Added jump optimisation modification.
10752
10753 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10754
10755         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10756
10757 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10758
10759         * support/regression/tests/funptrs.c: Added.
10760
10761 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10762
10763         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10764
10765 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10766
10767         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10768
10769         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10770
10771         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10772         (movLeft2ResultLong): Created.
10773
10774         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10775         (joinPushes): Added.  Joins two char pushes into a word push.
10776
10777 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10778
10779         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10780
10781         * support/makebin/Makefile (install): Added creation of dest dir.
10782
10783 2001-10-24 Karl Bongers <karl AT turbobit.com>
10784
10785         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10786
10787 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10788
10789         * src/z80/ralloc.c: Turned off faulty pack for one use.
10790
10791         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10792
10793         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10794
10795 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10796
10797         * support/regression/Makefile: Improved clean
10798
10799         * support/regression/ports/gbz80/spec.mk: Added clean
10800
10801         * support/regression/ports/host/spec.mk: Added clean
10802
10803         * support/regression/ports/z80/spec.mk: Added clean
10804
10805         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10806
10807         * support/regression/ports/mcs51/timeout.c: little improvements
10808
10809 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10810
10811         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10812
10813         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10814
10815         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10816
10817 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10818
10819         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10820
10821         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10822
10823 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10824         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10825
10826         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10827
10828         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10829
10830         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10831
10832         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10833
10834         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10835
10836         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10837
10838         * support/regression/tests/longor.c: Added.
10839
10840 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10841
10842         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10843
10844         * as/mcs51/aslink.h: define PATH_MAX
10845
10846         * as/mcs51/asm.h: define PATH_MAX
10847
10848         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10849
10850         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10851
10852         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10853
10854         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10855
10856         * src/SDCCglobl.h: define PATH_MAX
10857
10858         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10859
10860         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10861
10862 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10863
10864         * src/z80/gen.c (gencjneshort): Fixed
10865
10866         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10867
10868 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10869
10870         * support/regression/tests/bug-469671.c: Added.
10871
10872         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10873
10874 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10875
10876         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10877
10878         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10879
10880 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10881
10882         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10883
10884         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10885
10886         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10887
10888         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10889
10890         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10891
10892         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10893
10894         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10895
10896 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10897
10898         * 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.
10899
10900         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10901
10902         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10903
10904 2001-10-07    <johan AT FRIJA>
10905
10906         * device/lib/gets.c (gets): fixed the return value.
10907
10908 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10909         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10910
10911         * 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.
10912
10913         * 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.
10914
10915         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10916
10917         * src/pic/gen.c: Removed Safe_strdup.
10918
10919         * configure.in: Added option to enable libgc support.
10920
10921         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10922         (bitVectUnion): Optimised.
10923         (bitVectIntersect): Optimised.
10924         (bitVectBitsInCommon): Optimised.
10925         (bitVectCplAnd): Optimised.
10926
10927         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10928
10929 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10930
10931         * src/SDCCmain.c: distinguish between assembler debug and plain options
10932
10933         * src/avr/main.c:   remove standard assembler options
10934
10935         * src/ds390/main.c: remove standard assembler options
10936
10937         * src/mcs51/main.c: remove standard assembler options
10938
10939         * src/port.h: removed "PENDING" comment
10940
10941 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10942
10943         * src/device/lib/_mulint.c  : new, with assember functions
10944
10945         * src/device/lib/_mullong.c : new, with assember functions
10946
10947         * src/device/lib/_divuint.c : with assember functions
10948
10949         * src/device/lib/_divsint.c : with assember functions
10950
10951         * src/device/lib/_divulong.c: with assember functions
10952
10953         * src/device/lib/_divslong.c: with assember functions
10954
10955         * src/device/lib/_moduint.c : with assember functions
10956
10957         * src/device/lib/_modsint.c : with assember functions
10958
10959         * src/device/lib/_modulong.c: with assember functions
10960
10961         * src/device/lib/_modslong.c: with assember functions
10962
10963         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10964
10965         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10966
10967         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10968                                       replaced _mululong.c and _mulslong.c by _mullong.c
10969
10970 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10971
10972         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10973
10974 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10975
10976         * src/SDCCglue.c: test, if win32api is available for MINGW
10977
10978 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10979
10980         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10981         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10982         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10983         * support/regression/ports/host/spec.mk: removed GENERIC
10984         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10985         * support/regression/ports/z80/spec.mk: removed GENERIC
10986
10987 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10988
10989         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10990
10991         * support/regression/tests/bug-467035.c: Created.
10992
10993 2001-10-01    <johan AT FRIJA>
10994
10995         * src/SDCC.y: fixed bug #466586 part 1
10996
10997 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10998
10999         * SDCCicode.c: z80 has no generic pointers
11000         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
11001
11002 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
11003
11004         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
11005
11006 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
11007
11008         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
11009
11010         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
11011
11012 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
11013
11014         * configure.in: Fixed up so that ucsim is only configured once.
11015
11016         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
11017
11018         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
11019         (getPathDifference): As above.
11020
11021         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
11022
11023         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
11024
11025 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
11026         * .version: Updated to 2.3.1
11027
11028         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
11029         Added copyright header.
11030
11031         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
11032         (assemble): Added support for macro based assembler commands.
11033         (linkEdit): Added support for macro based linker commands.
11034         (preProcess): Changed the pre-processor to use macros.
11035         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
11036         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
11037
11038         * device/lib/z80/crt0.s: Added module name for debugging.
11039
11040 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
11041
11042         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11043
11044         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
11045
11046         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
11047
11048         * src/Makefile.in: Added SDCCmacro and SDCCutil
11049
11050 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11051
11052         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11053
11054 2001-09-16    <johan AT FRIJA>
11055
11056         * 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.
11057
11058 2001-09-15    <johan AT FRIJA>
11059
11060         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11061         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11062
11063 2001-09-11    <johan AT FRIJA>
11064
11065         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11066
11067 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11068
11069         * support/regression/tests/bug-460444.c: Added test case.
11070
11071         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11072         (genCast): Added justification for all of the asserts.
11073
11074 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11075
11076         * support/regression/support.c: _xdata replaced by xdata
11077
11078         * support/regression/spec.mk: removed _generic
11079
11080 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11081
11082         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11083
11084         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11085         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11086
11087         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11088
11089         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11090
11091         * support/regression/tests/bug-460010.c: Added test case.
11092
11093         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11094
11095 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11096
11097         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11098
11099         * support/regression/testfwk.c: removed workaround for bug #436344
11100
11101         * support/regression/tests/bp.c: use less memory with mcs51
11102
11103         * support/regression/tests/bug-441448.c: use less memory
11104
11105         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11106
11107         * support/regression/collate-results.py: typo
11108
11109 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11110
11111         * support/regression/tests/fetchoverlap.c: Added new test case.
11112
11113         * support/regression/tests/bp.c: Added new test case.
11114
11115         * support/regression/tests/bug-448984.c: Added new test case.
11116
11117         * support/regression/tests/pow2shifts.c: Added new test case.
11118
11119         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11120         (genlshTwo): Fixed right shift for count > 8.
11121
11122         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11123
11124 2001-09-08    <johan AT FRIJA>
11125
11126         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11127
11128 2001-09-07    <johan AT FRIJA>
11129
11130         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11131
11132         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11133
11134 2001-09-06    <johan AT FRIJA>
11135
11136         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11137         * bernhard noted me at this: "() equals to (void)" (1.38)
11138
11139 2001-09-05    <johan AT FRIJA>
11140
11141         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11142
11143 2001-09-04    <johan AT FRIJA>
11144
11145         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11146
11147
11148 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11149
11150         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11151
11152 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11153
11154         * link/z80/aslink.h: Fixed path for PATH_MAX
11155
11156 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11157
11158         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11159
11160         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11161
11162         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11163
11164         * 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.
11165
11166 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11167
11168         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11169         (genCmp): Fixed up genCmp for the GB with longs.
11170
11171         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11172
11173         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11174
11175         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11176
11177         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11178
11179 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11180
11181         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11182
11183 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11184
11185         * 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.
11186
11187         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11188
11189 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11190
11191         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11192
11193         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11194
11195 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11196
11197   * sim/ucsim/configure:    little improvement of Cygwin-detection
11198   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11199   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11200   * support/regression/tests/bug-221100.c: small changes for mcs51
11201   * support/regression/tests/bug-221168.c: small changes for mcs51
11202   * support/regression/tests/bug-227710.c: small changes for mcs51
11203   * support/regression/tests/staticinit.c: small changes for mcs51
11204   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11205   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11206   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11207
11208 $Revision$