* device/lib/Makefile: fixed build of gbz80 lib
[fw/sdcc] / ChangeLog
1 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
2
3         * device/lib/Makefile: fixed build of gbz80 lib
4
5 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
6
7         * support/regression/tests/bug-460010.c,
8         * support/regression/tests/bug-524691.c,
9         * support/regression/tests/bug-716242.c: removed conditional defines
10           that are already in testfwk.h
11
12 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
13
14         * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
15           (AccAXRsh1): added, shift right by 1,
16           (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
17            AccAXLrl1
18         * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
19
20 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
21
22         * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
23         remove cast to same type
24         * src/SDCCast.c (decorateType): fix for RFE 1475742,
25         optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
26         * as/z80/Makefile,
27         * link/z80/Makefile: removed, they have moved to
28         Makefile.in files
29         * configure,
30         * configure.in: replaced duplicate message about ucsim by missing sdcpp
31         * install-sh: fix bug #1204398 by setting umask 0022
32         * device/lib/Makefile: separate build of z80 and gbz80 lib
33
34 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
35
36         Enabled VPATH feature: changed nearly all Makefiles (149 files).
37         See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
38
39         One basic decision: e.g. src/clean.mk includes further files. In order
40         to make this work there are two solutions:
41         - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
42           run configure on them. This way they can use
43           'include $(srcdir)/port-clean.mk'
44         - always include clean.mk by the Makefile at the same level. To avoid
45           that `make clean` tries to include and build Makefile.dep the
46           MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
47           implemented, because now even `make uninstall` doesn't create
48           Makefile.in. clean.mk could be eliminated by pasting it in
49           Makefile.in.
50
51         * debugger/mcs51/Makefile.in: build own objects from library sources
52         (SLIB, SDCC) in current directory
53
54         * configure, configure.in: renamed --disable-device-lib-build in
55         --disable-device-lib; added --enable-doc, the required tools are
56         searched by configure; added result message; the toolchain for the
57         belonging ports are now only built, if the port is enabled.
58
59         * support/regression/*: all output is written in directory gen, because
60         the fwk and ports directories don't livet in the build tree using vpath
61
62         * doc/sdccman.lyx: renamed --disable-device-lib-build to
63         --disable-device-lib, added --enable-doc, added section VPATH
64
65         * sim/ucsim/configure.in,
66         * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
67         z80 are enabled by default
68
69 2006-04-24 Raphael Neider <rneider AT web.de>
70
71         * src/pic/device.c (pic14_assignConfigWordValue): remember assignments to
72             config word, "pic14_"-prefixed some extern functions
73           (pic14_emitConfigWord): emit __config directive(s) if assignment to
74             config word has been found
75         * src/pic/device.h: added prototypes
76         * src/pic/pcode.c: added "pic14_"-prefix where needed
77         * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic fixup
78         * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config words,
79           (pic14emitRegularMap): ignore config words,
80           (pic14createInterruptVect): moved generating __config directives away
81           (picglue): have __config directives emitted
82
83 2006-04-24 Borut Razem <borut.razem AT siol.net>
84
85         * doc/Makefile: sync with nightly build makefile
86
87 2006-04-24 Raphael Neider <rneider AT web.de>
88
89         * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
90             registers that have not been assigned proper liveranges,
91             fixes #1469504 and #1474602,
92           (pCodeRegOptimizeRegUsage): fixed typo in comment
93
94 2006-04-24 Borut Razem <borut.razem AT siol.net>
95
96         * device/examples/main8051.c: deleted - it was removed from CVS
97           24.mar.2000 and after that modified 18.feb.2001, so it reappered
98           after the transition to Subversion
99         * src/SDCCalloc.h: deleted - it was removed  from CVS
100           3.feb.2001 and after that modified 18.feb.2001, so it reappered
101           after the transition to Subversion
102         * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
103           sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
104           sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
105           sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
106
107 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
108
109         * as/asx8051.dsp: added mcs51/strcmpi.h
110         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
111         * as/hc08/aslink.h: updated lnksect prototype
112         * as/hc08/asm.h,
113         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
114         * as/hc08/asmain.c,
115         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
116           (newdot): handle A_ABS
117         * as/hc08/asout.c,
118         * as/mcs51/asout.c (outarea): output address
119         * as/hc08/lkaomf51.c,
120         * as/mcs51/lkaomf51.c: disabled unused array UsageType
121         * as/hc08/m08pst.c,
122         * as/mcs51/i51pst.c,
123         * as/z80/z80pst.c: "ABS" is not A_OVR
124         * as/hc08/lkarea.c (newarea): read a_addr,
125           (lnkarea): added codemap array, sort absolute areas to the front,
126            combine all GSINITx/GSFINAL,
127           (find_empty_space, allocate_space): new functions,
128           (lnksect): return next address, handle absolute sections
129         * as/mcs51/lkarea.c (newarea): read a_addr,
130           lnksect2 prototype changed,
131           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
132           (find_empty_space, allocate_space): new, factored out of lnksect2,
133           (lnksect2): return next address, handle absolute sections
134         * as/hc08/lkhead.c,
135         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
136         * as/hc08/lklibr.c (addfile, fndsym),
137         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
138           index out of range and detect both '\' and '/'
139         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
140         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
141           regression tests (ds390 cannot return bool yet)
142         * doc/sdccman.lyx: changed version number, document changed --no-peep,
143           document critical interrupts on z80, document changed SDCC define
144         * src/asm.c (_asxxxx_mapping): fixed .org directive,
145           (_a390_mapping): added .org directive
146         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
147           (genMultOneByte): fixed warnings
148         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
149           ones
150         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
151         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
152           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
153         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
154         * src/pic16/main.c: removed newReg prototype
155         * src/pic16/pcode.c,
156         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
157           warnings
158         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
159           ones
160         * src/pic16/ralloc.c
161         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
162           to fix warnings
163         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
164           from short to PIC_OPTYPE
165         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
166         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
167           optype from short to PIC_OPTYPE
168         * src/port.h: made int_size unsigned to fix warnings
169         * src/SDCC.y: fixed warning on MSVC
170         * src/SDCCicode.c (getArraySizePtr): return unsigned int
171         * src/SDCCopt.c (convertToFcall): fixed warnings
172         * src/SDCCsymt.h: removed double prototype for genSymName
173         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
174           offset int to fix warnings
175
176 2006-04-22 Borut Razem <borut.razem AT siol.net>
177
178         * doc/sdccman.lyx, */Makefile, */Makefile.in:
179           references to CVS replaced with Subversion
180
181 2006-04-21 Borut Razem <borut.razem AT siol.net>
182
183         * doc/sdccman.lyx, */Makefile, */Makefile.in:
184           references to CVS replaced with Subversion
185
186 2006-04-19 Borut Razem <borut.razem AT siol.net>
187
188         * src/version.awk: adapted for svn
189         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
190           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
191           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
192           /binutils-avr/etc/*.vi, *.jin: removed all properties
193           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
194
195 2006-04-19 Borut Razem <borut.razem AT siol.net>
196
197         * CVS to Subversion migration completed
198
199 2006-04-18 Borut Razem <borut.razem AT siol.net>
200
201         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
202           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
203
204 2006-04-17 Borut Razem <borut.razem AT siol.net>
205
206         * device/include/Makefile.in: added pic/*.inc to the installation
207
208 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
209
210         * support/regression/collate-results.py: fixed output in case of
211         a valdiag error
212         * support/regression/generate-cases.py: fixed splitting of pathnames
213         with dots
214         * as/hc08/lklibr.c (addfile),
215         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
216
217 2006-04-11 Raphael Neider <rneider AT web.de>
218
219         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
220         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
221         * src/pic16/pcode.c (assignValnums): fixed #1460578
222
223 2006-04-11 Raphael Neider <rneider AT web.de>
224
225         * device/lib/pic/libdev/*.c,
226         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
227           fixes #1468739, enables compilation in --std-c99 mode
228         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
229
230 2006-04-11 Raphael Neider <rneider AT web.de>
231
232         * src/pic/device.c (find_device): removed debug output
233           (list_valid_pics): enabled verbose listing of supported devices
234         * device/include/stdbool.h: define bool as char for pic14/16 as well
235
236 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
237
238         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
239
240 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
241
242         * .version: bumped version to 2.5.6
243         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
244
245 2006-04-06 Raphael Neider <rneider AT web.de>
246
247         * .version: bumped version to 2.5.6 (pic14 ABI changed)
248         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
249         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
250           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
251             pic14_constructAbsMap
252           (pic14printPublics): declare absolute global symbols as global
253           (pic14createInterruptVect),
254         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
255           (newReg): assume new registers unused, use correct name in
256             hashtable (reg->name instead of name), more debugLog output
257         * src/pic/device.h (PIC_device): added fields for verbose output
258         * src/pic/device.c: moved device definition to pic14devices.txt,
259             added routines for runtime parsing of pic14devices.txt,
260             added support for second config word
261         * src/pic/main.c (_process_pragma): removed #pragma maxram,
262           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
263           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
264           (_pic14_parseOptions): moved pCodeInitRegisters here
265           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
266         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
267           (pCodeInitRegisters): rewrapped comments, perpared new approach to
268             handling the pseudo stack
269         * device/lib/Makefile.in: ignore failures in objects-pic16,
270         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
271         * device/lib/pic/NEWS: document new dependency on picXXX.lib
272         * device/lib/pic/Makefile.subdir,
273         * device/lib/pic16/Makefile.subdir: improved clean rules
274         * device/lib/pic/libdev/: NEW, pic14 device libraries
275         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
276         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
277         * device/include/Makefile.in: create subdir and install pic14 headers
278         * device/include/pic/p16f_common.inc: removed unused declarations
279         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
280             PICs from inc2h.pl v1.6,
281             replaced BIT_AT macros with struct declarations
282         * device/include/pic/pic14devices.txt: definition of supported devices,
283             all above improvements contributed by Zik Saleeba, thanks
284         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
285         * support/scripts/sdcc.nsi: also install pic14 device libraries and
286             headers
287
288 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
289
290         * device/include/mcs51/c8051f410.h: added interrupt numbers,
291         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
292           thanks to Charles Olds
293
294 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
295
296         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
297
298 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
299
300         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
301         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
302         * support/regression/bug1464657.c: added, new test
303
304 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
305
306         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
307           version number
308
309 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
310
311         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
312           --no-peep and --peep-file <file> are used don't use default rules but
313           do use the <file>
314
315 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
316
317         * src/mcs51/gen.c (genCall): fixed bug 1457608
318
319 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
320
321         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
322         changes seem to cause (trigger?) problems with the build system.
323
324 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
325
326         * src/SDCCpeeph.c (operandsLiteral): new, added,
327           (callFuncByName): inserted operandsLiteral
328         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
329
330 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
331
332         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
333         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
334
335 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
336
337         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
338           implemented patch 1120823 Thanks to Willy De la Court (normal
339           interrupts need an interrupt number now if they are made critical),
340           and enabled nesting of critical functions though not for gbz80
341           (genCritical, genEndCritical): added functions
342           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
343         * src/z80/mappings.i: added "ei" to all mappings
344
345 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
346
347         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
348         submitted by the Debian SDCC maintainer Aurelien Jarno:
349         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
350         archive with gcc 4.1 on mips and wrote the patch"
351
352 2006-03-16 Raphael Neider <rneider AT web.de>
353
354         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
355           the left operand is shorter than the result (c* = lit-c* + int),
356           fixes bug #1450796
357         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
358           OP_SYMBOL
359
360 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
361
362         * src/.version: increased version number to 2.5.5
363         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
364         linking is done manually in pic16 port's _linkEdit,
365         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
366         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
367         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
368         allocate asmop as AOP_ACC,
369         (aopForRemat): added parameter 'bool result' in function declaration,
370         (pic16_aopGet): return AOP_ACC when accessing WREG,
371         (pic16_popGetTempReg): minor modification,
372         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
373         'pic16_allocWithIdx',
374         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
375         calling function in absolute addresses,
376         (genAssign): take into account AOP_ACC asmop,
377         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
378         * src/pic16/pcoderegs.c: some debug functions and lines added,
379         * src/pic16/ralloc.c (decodeRegType): added but commented out,
380         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
381         register too,
382         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
383         call to allocReg, not by manually allocating a new one,
384         (pic16_assignRegisters): now before going through the register
385         allocating functions mark all registers as free. This eliminates some
386         side effects resulting from peephole parser done earlier in the backbone
387
388 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
389
390         * src/SDCCicode.c (geniCodeLogic),
391         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
392
393 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
394
395         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
396           (genSend): bugfix, do not allocate and free twice,
397           (shiftRLong): handle partially overlapping aops
398         * support/regression/tests/bitopcse.c: fixed warning redefined idata
399
400 2006-03-08 Borut Razem <borut.razem AT siol.net>
401
402         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
403           for pic16
404
405 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
406
407         * support/regression/tests/bug1409955.c: new, added
408         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
409         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
410           (aopForSym, aopOp): increment asmop.allocated if reused,
411           (freeAsmop): decrement asmop.allocated and check for zero instead of
412           using asmop.freed,
413           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
414           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
415            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
416            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
417            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
418            genSignedRightShift, genRightShift, genDataPointerGet,
419            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
420            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
421             in reverse order from allocation,
422           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
423             added swappedLR to keep track
424         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
425           pdata & code for GCC, z80, gbz80 & hc08
426         * support/regression/tests/zeropad.c: moved defines to testfwk.h
427
428 2006-03-08 Raphael Neider <rneider AT web.de>
429
430         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
431
432 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
433
434         * device/include/mcs51/c8051f410.h: new SiLabs mcu
435         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
436         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
437
438 2006-03-06 Borut Razem <borut.razem AT siol.net>
439
440         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
441           made the linker quiet
442
443 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
444
445         * src/pic16/gen.c (genPcall): fixed bug #1443644
446         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
447         which dumps before the function entry point a data byte which represents
448         the number of the local variables used by the specified function, added
449         'xinst' for initial support for Extended Instruction Support,
450         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
451         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
452         port->fun_prefix anymore (may change later),
453         (genFunction, genEndFunction): do not store/restore local registers for
454         _main (this should take care the --main-return command line option in
455         the future),
456         (genOr): removed some legacy pic-port instructions,
457         * src/pic16/genarith.c (genAddLit): re-enabled old code because
458         performing operations with SFR's causes data to be written more than
459         once to each SFR. Perhaps SFRs should be handled in special cases...
460         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
461         pcode.h
462         * src/pic16/main.c (_process_pragma): stack bound checking did not take
463         into account for stack starting position,
464         (struct OPTIONS pic16_optionsTable): added command line argument
465         --extended or -y for Extended Instruction Support,
466         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
467         (deassignLRs): *** perhaps the most important change, old 'for' code
468         (commented out for reference), didn't account for some registers which
469         were left marked 'not free' after a pointer operation. The change
470         reduces register usage a lot in some cases
471
472 2006-03-04 Borut Razem <borut.razem AT siol.net>
473
474         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
475           _clean
476         * support/regression/tests/bug-524697.c: decreased array size for
477           mcs51 to fit into the internal RAM
478         * support/regression/Makefile.in: a little bit more verbose
479
480 2006-03-03 Borut Razem <borut.razem AT siol.net>
481
482         * support/regression/fwk/lib/testfwk.c,
483           support/regression/fwk/include/testfwk.h: introduced function
484           _prints(), nonrecursive _printn(), call _initEmu() from main()
485         * support/regression/ports/gbz80/support.asm,
486           support/regression/ports/ucz80/support.asm,
487           support/regression/ports/z80/support.asm,
488           support/regression/ports/ds390/support.c,
489           support/regression/ports/hc08/support.c,
490           support/regression/ports/host/support.c,
491           support/regression/ports/mcs51/support.c,
492           support/regression/ports/xa51/support.c: added empty _initEmu()
493           function
494         * support/regression/ports/pic16/gpsim.cmd,
495           support/regression/ports/pic16/spec.mk,
496           support/regression/ports/pic16/support.c,
497           support/regression/Makefile.in: added pic16 regression test
498
499 2006-03-01 Raphael Neider <rneider AT web.de>
500
501         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
502           genConstPointerGet): use safe way of generating MOVFF to cover
503             literals as well as registers, fixes bug #1440527
504         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
505             dereference
506           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
507             more correctly, fixes bug #1232186
508           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
509         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
510             gplink guess the correct processor in more cases, applied patch
511             from Till Riedel attached to and fixing bug #1436552
512
513 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
514
515         * support/regression/tests/array.c: added, contains check for #1434401
516         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
517
518 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
519
520         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
521         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
522         * device/include/mcs51/c8051f326.h,
523         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
524         * device/include/mcs51/c8051f000.h,
525         * device/include/mcs51/c8051f018.h,
526         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
527           PCON_IDLE,PCON_STOP and added sfr16 definitions
528
529 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
530
531         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
532           genGetWord): fixed bug 1409955
533
534 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
535
536         * device/include/hc08/mc68hc908gp32.h,
537         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
538
539 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
540
541         * src/SDCCast.c (constExprValue): return NULL if not a value
542         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
543         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
544         * support/regression/tests/bitfields.c: enabled signed bitfield for all
545
546 2006-02-13 Borut Razem <borut.razem AT siol.net>
547
548         * src/regression/ptrarg.c: added, fails due to bug #1430967
549         * src/regression/Makefile: ptrarg.c added, ...
550
551 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
552
553         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
554         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
555
556 2006-02-11 Borut Razem <borut.razem AT siol.net>
557
558         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
559           print "Processor: xxx" message to stdout only if --verbose
560
561 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
562
563         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
564         * support/regression/tests/bug1426356.c: added
565         * support/regression/tests/bitfields.c: removed 2 tests
566
567 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
568
569         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
570         * device/include/mcs51/c8051f330.h,
571         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
572           PCON_IDLE,PCON_STOP and added sfr16 definitions
573         * device/lib/_divsint.c,
574         * device/lib/_divuint.c,
575         * device/lib/_divulong.c,
576         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
577           register bank bug for small stackauto
578
579 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
580
581         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
582
583 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
584
585         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
586         * all.dsp: corrected several bin paths
587         * device/include/mcs51/c8051f120.h,
588         * device/include/mcs51/c8051f300.h,
589         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
590           to PCON_IDLE,PCON_STOP
591         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
592         * device/lib/printf_large.c (output_float): fixed bug 1388703
593         * support/regression/tests/bug1057979.c: added test for bug 1388703
594
595 2006-02-08 Raphael Neider <rneider AT web.de>
596
597         * src/pic/pcode.c (pciTRIS): fixed typo,
598           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
599           (LinkFlow): fixed handling of flows that end in a call,
600           (ReuseReg): perform safety check earlier
601         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
602             to work with flows at the beginning of a pBlock,
603             fixes #1426557 (Symbol not previously defined),
604           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
605             usage information
606           (RemoveUnusedRegisters): update register usage info
607         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
608             created, reuse existing ones instead
609         * src/pic/gen.c (genPcall): fixed #1424719
610
611 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
612
613         * link/z80/lkmain.c,
614         * link/z80/lklex.c,
615         * link/z80/lkdata.c,
616         * link/z80/aslink.h: fixed build on current cygwin:
617         replaced getline() by lk_getline()
618
619 2006-02-01 Borut Razem <borut.razem AT siol.net>
620
621         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
622           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
623           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
624           src/regression/bool1.c, src/regression/bool2.c,
625           src/regression/bool3.c, src/regression/call1.c,
626           src/regression/compare.c, src/regression/compare10.c,
627           src/regression/compare2.c, src/regression/compare3.c,
628           src/regression/compare4.c, src/regression/compare5.c,
629           src/regression/compare6.c, src/regression/compare7.c,
630           src/regression/compare8.c, src/regression/compare9.c,
631           src/regression/configword.c, src/regression/for.c,
632           src/regression/inline.c, src/regression/mult1.c,
633           src/regression/nestfor.c, src/regression/or1.c,
634           src/regression/pointer1.c, src/regression/ptrfunc.c,
635           src/regression/rotate1.c, src/regression/rotate2.c,
636           src/regression/rotate3.c, src/regression/rotate4.c,
637           src/regression/rotate5.c, src/regression/rotate6.c,
638           src/regression/rotate7.c, src/regression/string1.c,
639           src/regression/struct1.c, src/regression/sub.c,
640           src/regression/sub2.c, src/regression/switch1.c,
641           src/regression/while.c, src/regression/xor.c,
642           src/regression/create_stc, src/regression/simulate,
643           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
644           regression tests
645         * src/regression/gpsim_assert.h: added
646
647 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
648
649         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
650         ((void (code *) (void)) 0) ();
651         * as/hc08/aslex.c,
652         * as/hc08/aslink.h,
653         * as/hc08/asm.h,
654         * as/hc08/asmain.c,
655         * as/hc08/lkdata.c,
656         * as/hc08/lklex.c,
657         * as/hc08/lkmain.c,
658         * as/mcs51/aslex.c,
659         * as/mcs51/aslink.h,
660         * as/mcs51/asm.h,
661         * as/mcs51/asmain.c,
662         * as/mcs51/lkdata.c,
663         * as/mcs51/lklex.c,
664         * as/mcs51/lkmain.c,
665         * as/z80/aslex.c,
666         * as/z80/asm.h,
667         * as/z80/asmain.c: fixed build on current cygwin:
668         replaced getline() by as_getline()
669
670 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
671
672         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
673         declarator in the symbol chain
674         * src/SDCCsymt.h,
675         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
676         parameter list for function pointers
677         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
678         * support/regression/tests/bug-716242.c: added
679
680 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
681
682         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
683         offset if possible
684         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
685
686 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
687
688         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
689         inifinitely recurseable, added static
690         * support/regression/tests/bug-1408066.c: added
691
692 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
693
694         * src/SDCCicode.h,
695         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
696         renamed, added possibility to create "postLoopLbl"-labels
697         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
698         newiTempLoopHeaderLabel
699         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
700         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
701         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
702         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
703         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
704         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
705         (basicInduction): fixed bug #136564, made static,
706         (loopInduction): changed parameter of basicInduction, made static,
707         (addPostLoopBlock): added
708         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
709         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
710         findLoopEndSeq
711         * support/regression/tests/bug-136564.c: added
712         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
713         --std-sdcc99 to LIBSDCCFLAGS
714
715 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
716
717         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
718         while loop
719         * support/regression/tests/bug-1406131.c: added
720
721 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
722
723         * src/SDCCast.c (decorateType): fix promotion of unary minus
724         * src/SDCCsymt.c (computeType): beautified
725         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
726         (valUnaryPM, valComplement): fix sign and promotion,
727         (valNot): ANSI: result type is int (SDCC: unsigned char)
728         * support/regression/tests/uminus.c: speedup by removing superflous
729         test case 'int'
730         * support/regression/tests/onebyte.c: added promotion and signedness
731         tests for unary minus
732         * support/regressions/tests/bug-477927.c: disable warning about
733         uninitialized variables
734         * support/regression/tests/not.c: added
735
736 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
737
738         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
739         * src/mcs51/gen.c (gen51Code): show final register usage after
740         fillGaps in asm with --i-code-in-asm
741         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
742         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
743         incUsed, rliveClear, adjustIChain): made static,
744         (setFromRange): excluded because it's unused,
745         (findPrevUseSym, markWholeLoop): added,
746         (findPrevUse): rewritten; fixes bug 895992; now a complete search
747         through all branches of predecessors enables sdcc to emit the warning
748         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
749         (rlivePoint): made static, added parameter emitWarnings which is only
750         true during the first run out of two,
751         (findRecursiveSucc, findRecursivePred): removed,
752         (computeLiveRanges): made static, added parameter emitWarnings,
753         (dumpIcRlive): added for debugging only
754         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
755         removed prototype of setFromRange()
756         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
757         in call of computeLiveRanges()
758         * support/regression/tests/bug-895992.c: added
759         * support/regression/tests/bug-971834.c: added
760         * support/valdiag/tests/bug-895992.c: added
761         * support/valdiag/tests/bug-971834.c: added
762
763 2005-12-18 Raphael Neider <rneider AT web.de>
764
765         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
766           (genUnpackBits): improved code for direct operands,
767           (genPackBits): improved code for literal assignment to bitfields
768             and for direct destination operands (no FSR indirection),
769             prevented redundant AND, fixes #1362800,
770           (AccLsh): added parameter to disable masking of the result
771         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
772           skip instructions with side-effects (like incfsz),
773           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
774         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
775         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
776           fixes #1375263
777
778 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
779
780         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
781         volatile variables as spill location
782
783 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
784
785         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
786         replacing literals
787         * support/regression/tests/bug-1376320.c: added
788
789 2005-12-08 Raphael Neider <rneider AT web.de>
790
791         * src/pic/device.c: renamed is_shared to pic14_is_shared
792         * src/pic/gen.c (genIfx): re-enabled handling of sbits
793         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
794           (is_valid_identifier): added for above workaround
795
796 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
797
798         * device/lib/Makefile.in: fixed to enable port-specific-objects
799         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
800           char, thanks Hubert Sack
801         * doc/sdccman.lyx: documented --xstack-loc,
802           elaborated a bit more on interrupts and pitfalls,
803           removed "setjmp/longjmp unsupported",
804           documented some unsupported C99 features
805         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
806         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
807           if, thanks Hubert Sack
808         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
809         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
810           make make_library
811         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
812           regression tests can report resource usage (rfe 700441)
813         * support/regression/collate-results.py: report resource usage
814         * support/regression/ports/ds390/spec.mk,
815         * support/regression/ports/hc08/spec.mk,
816         * support/regression/ports/mcs51/spec.mk,
817         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
818         * support/regression/ports/ds390/uCsim.cmd,
819         * support/regression/ports/hc08/uCsim.cmd,
820         * support/regression/ports/mcs51/uCsim.cmd,
821         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
822         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
823           library, use the default one
824         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
825           building the library
826
827 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
828
829         * config.dsp: added dependency on .version and configure_vc.awk
830         * device/include/setjmp.h: updated for --stack-auto and --xstack
831         * device/include/mcs51/at89c51snd1c.h: corrected line endings
832         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
833         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
834         * device/lib/libsdcc.lib: added _setjmp
835         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
836           (decorateType): fixed bug 1372851,
837           (optimizeGetHbit): fixed warning
838         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
839           array initialisation
840         * support/regression/tests/bug1057979.c: added test for bug 1358192
841         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
842
843 2005-12-03 Borut Razem <borut.razem AT siol.net>
844
845         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
846           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
847
848 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
849
850         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
851         createIval): implement symbol independant "flexible array member",
852         (createIvalCharPtr): implemented flexible array initialisation with a
853         string
854         * src/SDCCsymt.c (copyStruct): removed,
855         (getSize): fixed misleading comment,
856         (getAllocSize): removed, the additional allocation size is now in
857         sym->flexArrayLength,
858         (checkStructFlexArray): new, syntax checks for flexible array members,
859         (compStructSize): added syntax checks for "flexible array members"
860         (copyStruct): removed,
861         (copyLinkChain): removed inefficient fix for bug 770487
862         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
863         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
864         symbol->flexArrayLength
865         * src/SDCCerr.c,
866         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
867         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
868         * support/regression/tests/structflexarray.c: added
869         * support/valdiag/tests/structflexiblearray.c: added
870
871 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
872
873         * src/SDCCast.c (decorateType): fixed bug 1368489
874         * support/Util/SDCCerr.c,
875         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
876
877 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
878
879         * device/include/mcs51/at89c51snd1c.h: added file submitted by
880           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
881
882 2005-11-27 Borut Razem <borut.razem AT siol.net>
883
884         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
885           support/cpp2/mkdeps.h: added command line option
886           -obj-ext=<extension> to SDCPP to define object file externion, used
887           for generation of make dependencies (-M)
888         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
889
890 2005-11-26 Borut Razem <borut.razem AT siol.net>
891
892         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
893           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
894           added pic and pic16 libraries
895
896 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
897
898         * device/include/float.h: Corrected typo in prototype of __fsgt
899
900 2005-11-25 Borut Razem <borut.razem AT siol.net>
901
902         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
903           added creation of model-mcs51-stack-auto libraries
904
905 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
906
907         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
908         and fields-list too
909         * src/SDCCast.c (createIvalArray): removed obsolete comment
910
911 2005-11-24 Borut Razem <borut.razem AT siol.net>
912
913         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
914           added missing device/lib/mcs51/crt*.asm sources
915
916 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
917
918         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
919
920 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
921
922         * device/lib/_fs2schar.c,
923         * device/lib/_fs2sint.c,
924         * device/lib/_fs2slong.c: optimized inline asm
925
926 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
927
928         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
929           Better handling of floats between -1.0 and 0.0.
930
931 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
932
933         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
934           (the missing "if"s prohibited removal of redundant labels)
935
936 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
937
938         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
939           Properly convert floats between -1.0 and 0.0 to long, int, and char
940           types (max integer value of negative floats tends to zero).
941         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
942           Removed changes made so to work properly with floats between
943           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
944           and _fs2char.c
945
946 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
947
948         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
949         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
950         (genCast) cosmetic change
951         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
952         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
953         from mcs51
954         * support/regression/tests/bitfields (testSignedBitfields): added
955
956 2005-11-18 Borut Razem <borut.razem AT siol.net>
957
958         * sdcc/device/lib/Makefile.in: remove all unnecessary files
959         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
960           introduced SILENT option to make building of pic16 libraries less
961
962 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
963
964         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
965           Now they work properly with floats between -1.0 and 0.0
966         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
967
968 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
969
970         * src/SDCCicode.c (printOperand): added missing else
971
972 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
973
974         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
975         reformatted for better readability
976         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
977         signed bitfields
978
979 2005-11-17 Borut Razem <borut.razem AT siol.net>
980
981         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
982           introduced SILENT option to make building of pic16 libraries less
983           verbose - used for nightly snapshot build
984         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
985           available on Win32 platforms.
986         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
987           medium, large, pic and pic16
988
989 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
990
991         * device/lib/printf_large.c: Temporary patch for bug 1358192:
992           printf("%f"...) sets fraction to zero.
993
994 2005-11-16 Raphael Neider <rneider AT web.de>
995
996         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
997           fixes #1357221
998         * src/pic/gen.c (genIfx): implemented for CARRY bit
999         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1000           to generic pointers, fixes #1357332,
1001           (pic16_movLit2f): NEW,
1002           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1003
1004 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1005
1006         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1007
1008 2005-11-11 Raphael Neider <rneider AT web.de>
1009
1010         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1011         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1012           compute pointer's type from operand,
1013           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1014           improved single bit reads, fixes bug #1353379
1015
1016 2005-11-09 Borut Razem <borut.razem AT siol.net>
1017
1018         * support/scripts/sdcc.nsi: added lib/pic to the package
1019
1020 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1021
1022         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1023
1024 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1025
1026         * support/regression/tests/bug1348008.c: added
1027         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1028         * support/regression/tests/bug1337835.c: updated comment
1029
1030 2005-11-06 Borut Razem <borut.razem AT siol.net>
1031
1032         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1033           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1034           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1035           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1036           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1037           dynamic construction of cl_error_class and derivates - 2.nd try
1038
1039 2005-11-05 Borut Razem <borut.razem AT siol.net>
1040
1041         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1042           bug, which caused Bus Errors on sparc solaris
1043
1044 2005-11-04 Borut Razem <borut.razem AT siol.net>
1045
1046         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1047           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1048           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1049           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1050           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1051           and derivates to resolve the initialization problem on OSX
1052
1053 2005-11-02 Borut Razem <borut.razem AT siol.net>
1054
1055         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1056           corrected typo - #include <winsock2.h>
1057
1058 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1059
1060         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1061           (_asxxxx_mapping): added org directive for future enhancements
1062
1063 2005-11-01 Borut Razem <borut.razem AT siol.net>
1064
1065         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1066           enabled sockets on WIN32
1067         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1068
1069 2005-10-31 Borut Razem <borut.razem AT siol.net>
1070
1071         * support/regression/generate-cases.py: escape backslashes in {testcase}:
1072           WIN32 backslash path delimiters should be escaped when used in C strings
1073         * support/regression/tests/bitfields.c: exclude failing assertions for
1074           __CYGWIN32__ and __MINGW32__ hosts
1075
1076 2005-10-30 Borut Razem <borut.razem AT siol.net>
1077
1078         * src/SDCCutil.c: corrected double comparison typo
1079
1080 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1081
1082         * device/lib/medium/Makefile: added for new memory model medium
1083         * device/include/asm/mcs51/features.h: updated for medium/pdata
1084         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1085           added Multiply & Accumulate sbit's and MAC0_PAGE define
1086         * device/include/mcs51/c8051f300.h: added sfr16 definitions
1087         * device/include/mcs51/c8051f310.h: added sfr16 definitions
1088         * device/lib/_mullong.c: update for medium model
1089         * device/lib/incl.mk: added medium model
1090         * doc/sdccman.lyx: documented medium model
1091         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1092         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1093         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1094         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1095           (allocParms): set SCLS and OCLS to pdata for medium model
1096         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1097           for pdata,
1098           (powof2): return <0 if not power of 2
1099         * src/avr/gen.c (genBitWise): use updated powof2
1100         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1101           (shiftR2Left2Result): small optimization in setup, save acc when storing,
1102           (shiftLLeftOrResult): use B if necessary
1103         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1104         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1105         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1106         * support/regression/Makefile.in: added test-mcs51-medium
1107         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1108
1109 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1110
1111         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1112         specifier unsigned
1113         * device/lib/time.c (mktime): fixed bug 1334315
1114
1115 2005-10-28 Raphael Neider <rneider AT web.de>
1116
1117         * device/include/pic/p16f_common.inc: added common declarations
1118         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1119
1120 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1121
1122         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1123           (aopPutUsesAcc): added to predict accumulator use,
1124           (assignResultValue): save acc if necessary,
1125           (genMinusDec): store result if indirectly addressed,
1126           (genDivOneByte):  save acc if necessary,
1127           (movLeft2Result): bugfix if left already in acc,
1128           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1129             attention to accumulator use (esp. pdata),
1130           (genReceive): receive pdata correctly
1131         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1132         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1133
1134 2005-10-27 Raphael Neider <rneider AT web.de>
1135
1136         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1137
1138 2005-10-27 Raphael Neider <rneider AT web.de>
1139
1140         * .version: changed version to 2.5.4
1141         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1142         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1143           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1144             arithmetics support routines
1145         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1146         * device/lib/Makefile.in: also create installdir for pic
1147
1148         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1149           pic14 port as well
1150         * src/pic/device.c (dump_sfr): rewritten to delegate register
1151           placement to the linker (use `extern sym' rather than sym EQU addr),
1152           (validAddress): fixed to check last specified address
1153         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1154           (popGetLit): truncate literal value to 8 bit,
1155           (popGet): moved assert to more appropriate place
1156           (popGetExternal): create pCode operand from and mark the according
1157             symbol as being `extern'
1158           (popGetAddr): added sanity check on immediate's offset, provide
1159             GPOINTER tag on demand
1160           (aopPut): fixed for immediates,
1161           (mov2w_op): move operand's address or contents to WREG (depending on
1162             operand type), safer variant of mov2w,
1163           (movwf,call_libraryfunc): NEW, handy abbreviations,
1164           (get_argument_pcop,get_return_val_pcop,pass_argument,
1165           get_returnvalue): interface for accessing function parameters and
1166             return values,
1167           (assignResultValuei,genRet): use new parameter/return value interface
1168           (pic14_getDataSize): back to old version handling generic pointers,
1169           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1170             provided implementation and/or fixed old one,
1171           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1172             calls, removed legacy 8051 reference code
1173           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1174           (loadSignToC): NEW, move the operands sign bit to CARRY,
1175           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1176             genRightShiftSigned, accepts negative shift counts,
1177           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1178           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1179             generic pointers, __data pointers and __code pointers,
1180           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1181             and signed bitfields, limit bitfields to 8 bit,
1182           (genDataPointerGet): fixed number of bytes read,
1183           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1184           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1185             pointers to constant data are no longer assumed to point to __code
1186             space, removed invalid pointer types,
1187           (bitpatternFromVal): retrieve the PICs representation of an integer
1188             or float literal,
1189           (genDataPointerSet): fixed assigning to po_immediate operands,
1190           (genGenPointerSet): implemented as library call,
1191           (genIfx): fixed incorrect condition,
1192           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1193             provide GPOINTER tag according to destination's storage class,
1194           (genCast): added code to handle casting to generic pointers, added
1195             sign-/zero extension of the result
1196           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1197         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1198         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1199           extend the result
1200         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1201           address/register resides in the shared banks
1202           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1203             put all variables into separate sections (have the linker arrange
1204             them)
1205           (picglue): put init code and interrupt handlers in separate sections
1206         * src/pic/main.c: added port specific options table, modified to PORT
1207           structure to make GPOINTERs 3 byte, added pic14_options
1208           (_pic14_do_link): private linking routine (update paths to libraries,
1209             add libsdcc.lib by default)
1210         * src/pic/main.h: declare pic14_options
1211         * src/pic/pcode.c: fixed instructions i/o relations,
1212           (RegCond): reverted to correct version,
1213           (newpCodeOpLit): truncate literals to 8 bit,
1214           (genericPrint): added debug output,
1215           (getRegFromInstruction): fixed for various operand types, simplified
1216           (BuildFlow): fixed broken handling of isntructions with labels
1217           (LinkFlow): start at last instruction in flow (skip trailing comments),
1218             pass the flow on to the next instruction after CALL
1219           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1220           (insertPCodeInstruction): fixed inserting after a skip instruction,
1221           (DoBankSelect): fixed for labeled instructions
1222           (OptimizepBlock): honor --nopeep switch
1223           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1224         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1225         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1226           (pCodeOptime2pCodes): allow disabling this optimization via
1227             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1228             but is still buggy), started implementation of a dataflow based
1229             pCode optimization (CSE + dead code elimination)
1230           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1231         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1232           names are independant of the stack location and therefore portable across
1233           devices
1234
1235 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1236
1237         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1238           (selectSpil): fixed bug 1337835 by not spilling bit variables
1239         * support/regression/tests/bug1337835.c: added test for this bug
1240         * src/mcs51/peeph.def: restart after rule 3.c,
1241           addded rules 263.x to optimize loading constants
1242
1243 2005-10-26 Raphael Neider <rneider AT web.de>
1244
1245         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1246         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1247           (genAssign): emit warning when casting literals to generic pointer
1248             type, also applies when taking the address of a fixed variable,
1249           (genCast): improved casting to generic pointers
1250         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1251           extern variables, added verbose error message
1252         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1253
1254 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1255
1256         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1257         carry must be complemented too
1258         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1259         could be emitted by genMinus
1260         * src/SDCCval.c (constVal): fixed bug 1305065
1261
1262 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1263
1264         * src/SDCCast.c (addCast): added promotion for bit variables
1265         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1266         promotion casts + optimisation
1267         (optimizeGetWord): fix warning 'i' might be used uninitialized
1268         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1269         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1270
1271 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1272
1273         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1274         all chars are promoted to int; promotion should be handled in SDCCast.c
1275
1276 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1277
1278         * device/lib/_strcmp.c: Fixed bug 1326457
1279
1280 2005-10-11 Raphael Neider <rneider AT web.de>
1281
1282         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1283         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1284
1285 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1286
1287         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1288         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1289
1290 2005-10-04 Raphael Neider <rneider AT web.de>
1291
1292         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1293           device/lib/pic16/pics.all: added pic18f1320
1294         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1295
1296 2005-09-30 Raphael Neider <rneider AT web.de>
1297
1298         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1299         * src/pic16/devices.inc: NEW, provides device descriptions
1300         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1301
1302 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1303
1304         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1305           GETHBIT
1306
1307 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1308
1309         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1310           documented Any Order Bit, Higher Order Byte and Higher Order Word
1311         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1312         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1313           (optimizeGetAbit): new, to get any bit, not only the high bit,
1314           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1315           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1316           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1317           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1318             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1319             GETABIT, GETBYTE, GETWORD: decorate them,
1320           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1321           (ast_print): added GETABIT, GETBYTE, GETWORD
1322         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1323         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1324           (geniCodeBinary): new generic binary icode,
1325           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1326         * src/port.h: updated comment for PORT.hasExtBitOp
1327         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1328           (genGetByte): new, to get a single byte,
1329           (genGetWord): new, to get a word from a long,
1330           (gen51Code): added GETABIT, GETBYTE, GETWORD
1331         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1332
1333 2005-09-23 Raphael Neider <rneider AT web.de>
1334
1335         * configure.in, configure: have device/lib/pic configured
1336         * device/lib/Makefile.in: added model-pic14
1337         * device/lib/clean.mk: added pic/ to clean rule
1338         * device/lib/pic: added rudimentary pic14 library providing support
1339           functions for multiplication/division/generic pointer access
1340         * src/SDCCopt.c (convilong): mark support functions as extern
1341           for pic14 port as well
1342         * src/pic/gen.c (genMult): added assertions,
1343           (genpic14Code): emit warning on unhandled iCodes
1344         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1345         * src/pic/pcode.c (pCodeOpCopy),
1346         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1347           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1348           SFR_REGISTER}), made safe for future extensions
1349         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1350           instructions even if preceeded by SKIP instructions (also remove
1351           them); removed unused code
1352         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1353           prevents leaving parts of the structure uninitialized after copying
1354
1355 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1356
1357         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1358           ago by me
1359         * support/regression/tests/addsub.c: added test for the bug
1360
1361 2005-09-21 Raphael Neider <rneider AT web.de>
1362
1363         * device/include/pic16/pic18f1220.h,
1364           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1365         * device/lib/pic16/Makefile.rules: added missing opening paren
1366         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1367           are provided in genutils.c,
1368           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1369           operand/result sizes,
1370           (genCmp): assert on NULL pointers first, then check deref'ed values
1371         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1372           result size
1373
1374 2005-09-18 Raphael Neider <rneider AT web.de>
1375
1376         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1377           as these are now unused,
1378           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1379         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1380           local, avoids uninitialized pointer dereference on r->name
1381         * src/pic16/ralloc.c (newReg): fixed indentation
1382
1383 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1384
1385         * src/SDCCval.c (constVal): fixed bug 730366
1386         * support/Util/SDCCerr.c,
1387         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1388
1389 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1390
1391         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1392
1393 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1394
1395         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1396
1397 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1398
1399         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1400           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1401         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1402           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1403         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1404         * packihx/packihx.c (hexDigit): made c unsigned char
1405         * as/mcs51/lklibr.c (fndsym),
1406         * link/z80/lkgb.c (gb),
1407         * link/z80/lklibr.c (fndsym),
1408         * link/z80/lkrloc.c (relr),
1409         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1410         * src/SDCC.lex (checkCurrFile, process_pragma),
1411         * src/SDCCglue.c (spacesToUnderscores),
1412         * src/SDCCmain.c (setParseWithComma, processFile),
1413         * src/asm.c (tvsprintf, printCLine),
1414         * src/avr/gen.c (emitcode, aopPut),
1415         * src/ds390/gen.c (emitcode),
1416         * src/hc08/gen.c (emitcode, emitinline),
1417         * src/mcs51/gen.c (emitcode, genInline),
1418         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1419           tokenizeLineNode),
1420         * src/pic/ralloc.c (debugLog),
1421         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1422           tokenizeLineNode),
1423         * src/pic16/ralloc.c (debugLog),
1424         * src/z80/main.c (_process_pragma):
1425            made all ctype.h function calls safe
1426         * src/SDCCopt.c: include math.h for fabs
1427         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1428           and used them throughout the code to make ctype.h function calls safe
1429         * src/ds390/main.c (asmLineNodeFromLineNode),
1430         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1431         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1432            unsigned char*
1433         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1434           (newpCodeAsmDir): made ctype.h function calls safe
1435         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1436           pic16_emitcode):  made lbp unsigned char*
1437         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1438           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1439         * src/xa51/gen.c (emitcode),
1440         * src/z80/gen.c (_emit2): made lbp unsigned char*
1441         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1442            char*
1443
1444 2005-09-05 Raphael Neider <rneider AT web.de>
1445
1446         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1447           access bank splitpoint
1448
1449 2005-09-05 Raphael Neider <rneider AT web.de>
1450
1451         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1452
1453 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1454
1455         * .version: changed to version 2.5.3
1456         * doc/sdccman.lyx: changed version to 2.5.3,
1457           documented --codeseg and --constseg and pragma codeseg and constseg,
1458           documented bit parameters (reentrant) and bit returning
1459         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1460            currFunc->recvSize, but is this ok for all ports?
1461           (ast2iCode): result of ~ on unsigned char must be cast to int for
1462            bool to work
1463         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1464           function pointers in bit space
1465         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1466           (processFuncArgs): call port.reg_parm() with reentrancy info
1467         * src/port.h,
1468         * src/avr/main.c,
1469         * src/ds390/main.c,
1470         * src/hc08/main.c,
1471         * src/pic/main.c,
1472         * src/pic16/main.c,
1473         * src/xa51/main.c,
1474         * src/z80/main.c: port.reg_parm prototype extended with
1475           "bool reentrant" parameter
1476         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1477           options.stackAuto for allocating bit register parameters
1478         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1479           (genSend): set BitBankUsed if it is,
1480           (selectRegBank): factored out of genCall for use in genPcall,
1481           (genCall): removed redundant dtype assignmen, use selectRegBank,
1482           (genPcall): handle returning in Carry properly, save in F0 if needed,
1483           (genReceive): handle bit register parameters
1484         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1485           (mcs51_assignRegisters): enable bit registers for all reentrant
1486            functions and don't set BitBankUsed unconditionally
1487         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1488         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1489         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1490
1491 2005-08-27 Borut Razem <borut.razem AT siol.net>
1492
1493         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1494         ppc-osx (Darwin) does not support -u option. It seems that it is
1495         supported only on Linux - GNU cp
1496
1497 2005-08-25 Borut Razem <borut.razem AT siol.net>
1498
1499         * sim/ucsim/gui.src/serio.src/Makefile.in,
1500           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1501           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1502           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1503           install and strip, since the strip at /usr/ccs/bin should be used
1504           on solaris
1505
1506 2005-08-24 Borut Razem <borut.razem AT siol.net>
1507
1508         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1509
1510 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1511
1512         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1513         ffffffffu
1514
1515 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1516
1517         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1518         * as/mcs51/lkmain.c (link_main): fixed warning
1519         * device/include/stdbool.h: ds390 has no advanced bit support yet
1520         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1521         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1522         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1523           and updated their macros
1524         * src/SDCCval.c (constVal): updated comment for renamed b_long
1525
1526 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1527
1528         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1529         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1530           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1531           (oprio): set priority for '['
1532         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1533            and adb_24_bit
1534         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1535         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1536         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1537         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1538           added overlayable BIT_BANK area
1539         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1540           (summary2): explain 'T' in legenda
1541         * as/mcs51/lkrloc.c: replaced old K&R style,
1542           (relr): added R_BIT processing,
1543           (errmsg): added "Bit-addressable relocation error",
1544           (adb_bit): added for converting from byte- to bit-addressable space,
1545           (adb_24_bit): added for converting from byte- to bit-addressable space
1546         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1547            used in reentrant functions now even as return value
1548         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1549         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1550           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1551         * src/SDCCglobl.h: added indicator BitBankUsed
1552         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1553            the bit registers b0-b7
1554         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1555           (geniCodeCast): fixed bug 1263853,
1556           (geniCodeLogicAndOr): put result in bool or char,
1557           (geniCodeReceive): added parameter func for accessing the return type,
1558           (geniCodeFunctionBody): pass func to geniCodeReceive
1559         * src/SDCCmain.c: added indicator BitBankUsed
1560         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1561         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1562           (checkSClass): don't put automatic bool/bit on stack,
1563           (checkFunction): removed check on function cannot return bit
1564         * src/SDCCsymt.h: added newBoolLink prototype
1565         * src/mcs51/gen.c (rb1regs): added bit registers,
1566           (movc): created for assigning to carry,
1567           (pushReg, popReg): created for pushing registers,
1568           (sameRegs): check both AOP_REG and AOP_CRY types,
1569           (aopOp): handle bit registers,
1570           (aopPut): optimization no self-assign,
1571           (saveRegisters): push reg->base (bits) only once for bit registers,
1572            and use pushReg,
1573           (unsaveRegisters): pop reg->base only once and use popReg,
1574           (assignResultValue): added parameter func and return in carry for bits,
1575           (genIpush): optimization no reload in A if not changed,
1576           (genSend): bit parameters in reentrant functions are passed in bit
1577            registers by first assigning to bits in B, then save registers and
1578            copy B to bits,
1579           (genCall): handle returning in Carry properly, save it in F0 if needed,
1580           (genPcall): updated assignResultValue call, this is not safe yet for bit
1581            returning function !!!
1582           (genFunction): don't generate equ's for bit registers and use pushReg,
1583           (genEndFunction): take care of bit returning functions and use popReg,
1584           (genRet): return bit in Carry,
1585           (genIfx): optimize bit registers and other directly addressable bits,
1586           (genReceive): updated assignResultValue call
1587         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1588           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1589            registers when using stack-auto
1590         * src/mcs51/ralloc.c (_G): added allBitregs,
1591           (regs8051): added the bit registers,
1592           (createStackSpil): use macro IS_BIT,
1593           (getRegBit): added to allocate a bit register, else spill,
1594           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1595           (updateRegUsage): factored out to ease stepping while debugging,
1596           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1597            also allocate bit registers,
1598           (fillGaps): handle bit registers,
1599           (findAllBitregs): added to create bit vector with all bit registers,
1600           (mcs51_allBitregs): returns this bit vector,
1601           (mcs51_assignRegisters): when using stack-auto use bit registers for
1602            passing parameters and creating local variables
1603         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1604
1605 2005-08-22 Borut Razem <borut.razem AT siol.net>
1606
1607         * device/lib/Makefile.in: replaced find option -or with -o
1608           to make it run on solaris
1609
1610 2005-08-22 Raphael Neider <rneider AT web.de>
1611
1612         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1613           fixes #1265442 (crash on Solaris)
1614
1615 2005-08-20 Borut Razem <borut.razem AT siol.net>
1616
1617         * configure, configure.in: added tests for libsocket and libnsl libraries,
1618           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1619           from support/regression/Makefile.in
1620         * support/regression/Makefile.in: added
1621         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1622         * sim/ucsim/libtool: regenerated on sparc-solaris
1623         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1624           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1625           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1626           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1627           sparc-solaris, which doesn't use GNU ld linker
1628         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1629         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1630
1631 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1632
1633         * src/mcs51/peeph.def: updated comments
1634
1635 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1636
1637         * device/lib/_gptrget.c,
1638         * device/lib/_gptrput.c: slightly shorter
1639         * doc/sdccman.lyx: incremented version
1640         * src/mcs51/peeph.def: moved peephole comments to the line of first
1641           change to better keep line correlation, reanimated 186.e
1642         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1643
1644 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1645
1646         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1647           David Saxton with quotes around file name.
1648
1649 2005-08-15 Borut Razem <borut.razem AT siol.net>
1650
1651         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1652           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1653           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1654           make tests run on x86_64 platform
1655
1656 2005-08-13 Raphael Neider <rneider AT web.de>
1657
1658         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1659           as it might be executed DURING a build (parallel make is wonderful)
1660
1661 2005-08-13 Raphael Neider <rneider AT web.de>
1662
1663         * device/lib/Makefile.in (port-specific-objects-pic16):
1664           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1665         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1666           dependency
1667         * device/lib/pic16/Makefile.rules: build subdirs before creating
1668           the library, removed builddir rule, create $(builddir) early in
1669           recurse rule, use empty recurse rule for leaf directories
1670         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1671           mkdir errors (race condition), removed duplicate suffix "hex"
1672           from clean rules
1673         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1674         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1675           prevents mkdir -p from aborting on Alpha
1676
1677 2005-08-12 Raphael Neider <rneider AT web.de>
1678
1679         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1680           db-statements in order to allow for arrays of pointers in code
1681           sections to be placed without interspersed 0-padding, fixes
1682           bug #1256215
1683         * (emitStatistics): fixed division by zero for pic18f1220
1684         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1685           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1686         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1687         * (pic16_pCodeConstString): keep track of already emitted string
1688           literals to prevent "duplicate definitions of symbol _str_NR"
1689         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1690           debug message
1691         * device/lib/Makefile.in: ignore failing PIC16 library builds
1692         * device/lib/pic16/Makefile: do not build if gputils are missing
1693         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1694
1695 2005-08-10 Raphael Neider <rneider AT web.de>
1696
1697         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1698           my last commit)
1699
1700 2005-08-10 Raphael Neider <rneider AT web.de>
1701
1702         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1703           Rokas' patch to add the new fixed point type "__fixed16x16"
1704         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1705           functions for __fixed16x16 arithmetics
1706         * device/lib/pic16: reimplemented the build system to support
1707           a separate build directory, better handling of libio (create
1708           the library in a separate subdir for each architecture) and
1709           easier configuration (centralized in Makefile.common)
1710
1711 2005-08-07 Raphael Neider <rneider AT web.de>
1712
1713         * src/pic16/gen.c (genrshTwo): fixed sign extension
1714         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1715         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1716           added T0CONbits
1717         * device/include/pic16/pic18f4220.h: NEW, header for
1718           pic18f4220 and pic18f4320
1719         * device/include/pic16/pic18fregs.h: added new devices,
1720           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1721         * device/include/pic16/signal.h: resolved name clashes
1722           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1723           to also allow testing for interrupt enable bits, added
1724           comments on how to use the macros
1725         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1726         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1727           register definitions for the devices
1728         * device/lib/pic16/pics.all: added new devices
1729         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1730           allocated memory
1731         * device/lib/pic16/libc/stdlib/memfree: do not count
1732           the block header as free memory
1733         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1734           simplified and added missing end-of-blocklist-marker
1735           (reported by Peter Onion, fixes #1252814)
1736         * (_mergeHeapBlock): fixed loop condition
1737         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1738           len==0, restructured code
1739         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1740           up a bit, reduced bitfield accesses, prevent endless loops
1741           in case of heap corruption
1742         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1743           "unreferenced arguments/must return a value" warnings
1744         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1745           replaced BAUDREG with SPBRG
1746         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1747           device/lib/pic16/debug/gstack/gstack.c: replaced
1748           _naked, _asm, _endasm with __naked, __asm, __endasm
1749
1750 2005-08-05 Raphael Neider <rneider AT web.de>
1751
1752         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1753           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1754
1755 2005-08-05 Borut Razem <borut.razem AT siol.net>
1756
1757         * device/lib/Makefile.in: added missing ';'
1758         * configure: removed ^M characters
1759
1760 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1761
1762         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1763           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1764           License
1765
1766 2005-08-04 Borut Razem <borut.razem AT siol.net>
1767
1768         * configure.in: pic16 libraries build 2nd try - enable running
1769           configure in device/lib/pic16
1770         * configure: regenerated from configure.in
1771         * device/lib/Makefile.in: create $(PORT)/bin directory
1772
1773 2005-08-03 Raphael Neider <rneider AT web.de>
1774
1775         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1776           to get/set values via pointers
1777         * (genUnpackBits,genPackBits): changed detection of
1778           ptr->bitfield vs. sym.bitfield, fixed access via generic
1779           pointers, removed dead (wrong) code for multibyte bitfields
1780         * (genNearPointerGet, genGenPointerGet): removed useless code,
1781           fixed bitfield detection, fixes #1250594
1782         * (genNearPointerSet): removed useless code
1783         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1784           and introduced macro pic16_emitpcode that conditionally emits
1785           the origin of the following pCode (useful for debugging SDCC)
1786         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1787         * (createDefmap): fixed handling of LFSR for --optimize-df
1788
1789 2005-08-02 Borut Razem <borut.razem AT siol.net>
1790
1791         * device/lib/Makefile.in: pic16 libraries build enabled since
1792           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1793
1794 2005-08-02 Raphael Neider <rneider AT web.de>
1795
1796         * src/pic16/gen.c (genPackBits): removed deprecated warning
1797         * (genGenPointerSet): fixed bitfield detection
1798
1799 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1800
1801         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1802
1803 2005-07-31 Raphael Neider <rneider AT web.de>
1804
1805         * device/lib/pic16/libdev/pic18f458.c,
1806           device/include/pic16/pic18f458.h: added missing T0CONbits
1807
1808 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1809
1810         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1811
1812 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1813
1814         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1815
1816 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1817
1818         * device/include/mcs51/at89c51ed2.h: added.
1819
1820 2005-07-23 Raphael Neider <rneider AT web.de>
1821
1822         * src/pic/gen.h: added emitpcode macro for debugging
1823         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1824           and replace by macro adding debug information on demand
1825         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1826         * (gencjne): tried to fix; replaced with correct (slower) code
1827         * (gen{Unp,P}ackBits): fixed single bit access
1828         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1829         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1830           previous instruction
1831         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1832           register has to be handled with care (forbidding movement
1833           of assignments/uses, removing assignments completely, ...)
1834         * (pCodeOptime2pCodes): make use of regIsSpecial
1835         * added lots of debugging output (commented out)
1836         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1837           from being reused as result UNLESS it is known to work
1838
1839 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1840
1841         * support/Util/dbuf.h: include <stddef.h> for size_t
1842         * .version: changed to version 2.5.2
1843
1844 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1845
1846         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1847
1848 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1849
1850         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1851           (genModOneByte): removed needless psha/pula
1852
1853 2005-07-22 Raphael Neider <rneider AT web.de>
1854
1855         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1856           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1857         * src/pic/gen.c (resolveIfx): do not "invent" labels
1858         * (genSkipc): changed to positive logic
1859         * (genSkipCond): removed as no longer needed
1860         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1861           backport from PIC16
1862         * (genLeftShift): check operands are in different registers
1863         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1864           INCF does not update CARRY...
1865         * src/pic/main.c: fixed _linkCmd
1866         * src/pic/pcode.c (unlinkpCode): added inactive code
1867         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1868           alive (do not assign result and operand overlapping registers)
1869
1870 2005-07-22 Raphael Neider <rneider AT web.de>
1871
1872         * src/pic/device.c (dump_sfr): replaced register declaration with
1873           call to emitSymbolToFile() to avoid duplicate symbols
1874         * (assignRelocatableRegisters): do not declare external symbols
1875         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1876           right (take size of type, not etype)
1877         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1878         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1879         * (packRegsForAccUse): disabled assignment of WREG as
1880           the result reg to prevent occurence of just fixed #1235003,
1881           fixes #1242954
1882         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1883           symbols (avoids duplicate symbols in .asm file)
1884         * (pic14emitRegularMap): use emitSymbolToFile()
1885         * src/pic/gen.c (aopOp): fixed spillLocation handling
1886         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1887         * (genDataPointerSet): removed unneccessary variables/output
1888
1889 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1890
1891         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1892         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1893
1894 2005-07-21 Raphael Neider <rneider AT web.de>
1895
1896         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1897           architecture cannot handle them efficiently, fixes bug #1235003
1898         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1899           check for empty sets before using them (fixes bug #1232190)
1900
1901 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1902
1903         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1904           (lnksect2): generate warnings for memory overlap
1905         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1906           constseg to set the name of these segments so you can instruct the linker
1907           to place them in banks
1908         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1909         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1910           added code_seg and const_seg to options
1911         * src/SDCCglue.c (emitMaps): use options.const_seg,
1912           (createInterruptVect): put interrupt vectors in segment HOME,
1913           (glue): put HOME before static segment and put the main glue in HOME,
1914           (glue): use options.code_seg
1915         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1916         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1917           these segments so you can instruct the linker to place them in banks
1918           (linkEdit): use code_loc for HOME segment which should be the first
1919           segment in code memory now
1920         * src/SDCCmem.c: fixed more stuff like bug 1238386
1921         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1922           (changePointer): don't change function pointers to code pointers for
1923           banked functions,
1924           (compareType): added exceptional check for banked function pointers
1925         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1926         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1927           after static in code memory
1928         * src/mcs51/gen.c: added aopLiteralLong prototype,
1929           (aopForSym): use getSize for functions,
1930           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1931           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1932           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1933           the segment,
1934           (genPcall): use call for literal function pointers and generate banked
1935           calls over the one trampoline so there's only one place for the user to
1936           modify according to his/hers hardware,
1937           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1938           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1939         * src/mcs51/main.c: added keyword banked,
1940           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1941         * support/Util/SDCCerr.c,
1942         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1943           needed for passing the bank and address to the trampoline
1944         * device/lib/mcs51/crtbank.asm: added for bankswitching
1945         * device/lib/mcs51/Makefile: added crtbank
1946
1947 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1948
1949         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1950           for fields at offset 0 of a struct or union as reported
1951           on 2005-07-07 in the developer mailing list.
1952
1953 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1954
1955         * src/SDCCmem.c: fixed bug 1238386
1956
1957 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1958
1959         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1960           (patch #1144962), added peephole 300, enabled 259.x
1961         * doc/sdccman.lyx: removed screenshot and provided link instead
1962
1963 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1964
1965         * doc/sdccman.lyx: added section about debugging with ddd
1966         * doc/figures/ddd_example.eps: screenshot of debugging session
1967
1968 2005-07-04 Raphael Neider <rneider AT web.de>
1969
1970         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1971           like CODE pointers, fixes #1115683
1972         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1973           call, fixes bugs #1232211, #1228110,
1974           fixed wrong casts to pCodeFlow from pCodeInstructions
1975
1976 2005-07-04 Raphael Neider <rneider AT web.de>
1977
1978         * src/pic/gen.c (popGet): changed assert to allow for
1979           bit operands
1980         * (popGetAddr): changed signature to provide
1981           an additional index, patched all call sites
1982         * (genCmpEq): handle literal-like operands correctly
1983         * (genAddrOf): added sanity checks on __code/__data pointers
1984         * (genAssign): added handling of symbols from __code section
1985         * (gencjne): do not generate code for comparisons whose result
1986           is neither stored nor used, fixes bug #1171114
1987         * (AccLsh, AccRsh): operate on operand instead of WREG
1988         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1989           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1990           by known count
1991         * rewrote complete shift-by-literal logic, commented unused
1992           functions out
1993         * (genConstPointerGet): get multiple bytes (if result size > 1),
1994           fixed handling of non-immediate addresses
1995         * (genPointerGet): handle CODE pointers like CONST pointers
1996         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1997         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1998           operand is to be treated as a literal or not
1999         * (mov2w,genPcall,genCmpEq),
2000           src/pic/genarith.c: use aop_isLitLike() to decide between
2001           literal/register contents
2002         * (addSign): added missing offset
2003         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2004           only emit comment in debug-mode,
2005           use {aop,op}_isLitLike throughout the file
2006         * src/pic/glue.c: fix initializers for pointers (work in progress)
2007         * src/pic/pcode.c (get_op): honor index on _const symbols
2008         * ({reset,dump}pCodeStatistics): NEW, estimate code size
2009         * (dumppBlock): added pCode size estimation
2010         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2011           check for IS_SYMOP before OP_SYMBOL'ing
2012         * fixed indentation, compacted switch-statements
2013         * (allocReg): find free register and allocate it instead of
2014           allocating new registers all the time
2015         * (deassignLRs): prevent POINTER_GET's from being assigned the same
2016           registers as its operands (necessary only for multibyte GETs)
2017
2018 2005-07-01 Raphael Neider <rneider AT web.de>
2019
2020         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2021           debugging .asm-output macros FENTRY + FEXIT
2022         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2023           way... I wonder...
2024         * (emitpComment): NEW, printf to pCode
2025         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2026           offset handling
2027         * (popGetAddr): NEW, variant of popGet to access an immediates
2028           high(er) bytes instead of the n'th byte of memory they reference,
2029           replaced popGet with popGetAddr where neccessary
2030         * (genDataPointerGet): reactivated and fixed implementation
2031         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2032           accesses
2033         * (genDataPointerSet): fixed multibyte assignments
2034         * (genpic14Code): fixed --i-code-in-asm handling
2035         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2036         * (genPlus): fixed index-out-of-bounds error
2037         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2038         * src/pic/ralloc.c: added debugging output macro FENTRY2
2039         * (spillThis): fixed indentation, enbraced for-body for clarity
2040         * (rematStr): commented out as now unused
2041         * (regTypeNum): commented out special spill case (overwrites
2042           arbitrary values)
2043         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2044
2045 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2046
2047         * doc/sdccman.lyx: documented sfr16/sfr32,
2048           added example for using storage class with function pointers
2049         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2050
2051 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2052
2053         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2054         * device/lib/_itoa.c,
2055         * device/lib/_ltoa.c: optimized codesize
2056         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2057           but don't know how to suppress the double warning.
2058         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2059         * support/Util/SDCCerr.c,
2060         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2061
2062 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2063
2064         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2065           fixed old K&R prototypes
2066         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2067         * device/lib/_gptrget.c,
2068         * device/lib/_gptrgetc.c,
2069         * device/lib/_gptrput.c: changed versions for new memory indicator values,
2070           also new versions for small generic pointers and banked generic pointers
2071         * src/port.h: added const_name
2072         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2073         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2074         * src/SDCCcse.c (findPrevIc): check all associative operators
2075         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2076         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2077         * src/SDCCmem.c: updated comments,
2078           set far-space to 0 for pdata, results in optimized code
2079         * src/SDCCmem.h: added macro CONST_NAME
2080         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2081           moving the info into the highest bits, see also gptrget/gptrput
2082         * src/src.dsp: added sdcc.ico to project files
2083         * src/avr/gen.c (genCast): fixed bug 0x%d
2084         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2085         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2086           relation between ptr_type and DCL_TYPE,
2087           (genCast): fixed bug 0x%d
2088         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2089           (CODE)" for const_name
2090         * src/hc08/gen.c (genCast): fixed bug 0x%d
2091         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2092           (hc08_port): added "CONST (CODE)" for const_name
2093         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2094           (aopForRemat, adjustArithmeticResult): disconnected direct relation
2095           between ptr_type and DCL_TYPE,
2096           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2097           operand* and took AOP() inside function so sfr-ness can be checked,
2098           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2099           new prototype,
2100           (genFunction, genEndFunction): optimized stack setup,
2101           (genMinus): optimized for literals with ending zeroes (in bytes),
2102           (genCast): fixed bug 0x%d
2103         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2104           (mcs51_port): added "CONST (CODE)" for const_name
2105         * src/mcs51/peeph.def: made rule 226 more generic
2106         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2107         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2108         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2109         * src/z80/main.c (z80_port): added NULL for const_name,
2110           (gbz80_port): added NULL for const_name
2111         * support/regression/tests/bug663539.c,
2112         * support/regression/tests/sfr16.c: new tests
2113
2114 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2115
2116         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2117
2118 2005-06-24 Raphael Neider <rneider AT web.de>
2119
2120         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2121           corrected typos...
2122         * device/include/pic16/signal.h: added USBIF
2123           and SIG_USB
2124
2125 2005-06-24 Raphael Neider <rneider AT web.de>
2126
2127         * device/lib/pic16/libdev/pic18f2455.c,
2128           device/include/pic16/pic18f2455.h: NEW
2129         * device/include/pic16/pic18fregs.h,
2130           device/lib/pic16/pics.all,
2131           src/pic16/device.c: added 18f2455
2132         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2133           device/include/pic16/{pic18f[68][567].h,usart.h}:
2134           replaced MULTIPLE_USARTS define with more relaible
2135           compatibility sfrs (for USART access)
2136
2137 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2138
2139         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2140           and the output asm file line is printed on two lines.
2141
2142 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2143
2144         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2145           BGT, BLE, BHI, and BLS instructions
2146         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2147           genCmpEq): removed
2148         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2149           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2150           fixes bug #1216342
2151         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2152
2153 2005-06-15 Raphael Neider <rneider AT web.de>
2154
2155         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2156         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2157         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2158           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2159           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2160
2161 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2162
2163         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2164           Marcel Telka in bug #1215704
2165
2166 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2167
2168         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2169           located in shared memory bank.
2170
2171 2005-05-31 Raphael Neider <rneider AT web.de>
2172
2173         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2174           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2175           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2176
2177 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2178
2179         * device/lib/_strncpy.c: fixed the fix
2180
2181 2005-05-26 Raphael Neider <rneider AT web.de>
2182
2183         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2184           initializers with \0, bug #1208187
2185         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2186           intializers with \0, bug #1208187
2187
2188 2005-05-26 Raphael Neider <rneider AT web.de>
2189
2190         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2191           initializers with \0, bug #1208187
2192         * src/pic16/main.c (_process_pragma): added sanity checks
2193           for stack position and size, emit warnings when appropriate
2194
2195 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2196
2197         * device/lib/_strncpy.c: fixed not filling with \0
2198
2199 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2200
2201         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2202           createFunction),
2203         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2204           compound_statement),
2205         * src/SDCCsymt.h,
2206         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2207
2208 2005-05-24 Raphael Neider <rneider AT web.de>
2209
2210         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2211
2212 2005-05-24 Raphael Neider <rneider AT web.de>
2213
2214         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2215           TRISE definitions, closes bug #1162453
2216
2217 2005-05-22 Raphael Neider <rneider AT web.de>
2218
2219         * src/pic16/main.c (_process_pragma): check for missing
2220           arguments to pragmas code and udata
2221         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2222           consistency fixes to match other headers (thanks to Jim Paris)
2223         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2224
2225 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2226
2227         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2228
2229 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2230
2231         * support/regression/tests/bug1198642.c: new test
2232         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2233         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2234         * support/scripts/resource.h,
2235         * support/scripts/resource.rc,
2236         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2237         * support/scripts/sdcc.ico: added 32x32 icon
2238
2239 2005-05-18 Raphael Neider <rneider AT web.de>
2240
2241         * device/lib/pic16/libdev/pic18f*.c,
2242         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2243           keywords to "__sfr" and "__at (X)"
2244         * device/include/pic16/pic18fregs.h: added pic18f4520
2245         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2246           #1203088 (MPLAB compatibility)
2247
2248 2005-05-17 Raphael Neider <rneider AT web.de>
2249
2250         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2251         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2252         * device/lib/pic16/pics.all: added new devices
2253         * src/pic16/device.c: added support for pic18f4520
2254
2255 2005-05-16 Raphael Neider <rneider AT web.de>
2256         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2257         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2258         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2259           convenience function for bit access
2260
2261 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2262
2263         * device/lib/printf_large.c: fixed bug 1193299
2264         * support/regression/tests/bug1057979.c: added test %3.3s
2265
2266 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2267
2268         * device/include/mcs51/8051.h,
2269         * device/include/mcs51/8052.h: made parseable with lint
2270         * device/include/mcs51/lint.h: added include file for (sp)lint
2271         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2272         * doc/cdbfileformat.lyx,
2273         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2274
2275 2005-05-14 Raphael Neider <rneider AT web.de>
2276
2277         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2278         * device/lib/pic16/libc/stdlib/itoa.c (new)
2279         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2280         * device/lib/pic16/libio/Makefile: exclude subdir according to
2281           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2282         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2283         * src/pic16/gen.c (genFunction): prevent annoying warning
2284         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2285           nameclashes on BeOS
2286         * support/cpp2/cppmain.c (cpp_output_string): new
2287         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2288           fixes bug 1116802
2289
2290 2005-05-13 Borut Razem <borut.razem AT siol.net>
2291
2292         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2293
2294 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2295
2296         * .version: changed to version 2.5.1; back to bleeding edge development
2297
2298 2005-05-11 Borut Razem <borut.razem AT siol.net>
2299
2300         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2301           generate PDF version 1.3 documents
2302
2303 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2304
2305         * .version: changed to version 2.5.0
2306
2307 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2308
2309         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2310
2311 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2312
2313         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2314         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2315         well as many smaller updates.
2316         * .version: changed to version 2.5.0-pre1
2317
2318 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2319
2320         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2321
2322 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2323
2324         * support/regression/tests/bug1185672.c: added
2325         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2326           bug 1185672
2327         * src/mcs51/gen.c (genCall): added comments, made it look safer
2328         * src/mcs51/gen.c (genEndFunction): simplified
2329
2330 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2331
2332         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2333
2334 2005-04-14 Borut Razem <borut.razem AT siol.net>
2335
2336         * fixed bug 1045046 - SIGSEGV with really simple code?:
2337           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2338           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2339
2340 2005-04-14 Borut Razem <borut.razem AT siol.net>
2341
2342         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2343           src/pic16/device.h: temporarily disabled experimental #inline pragma
2344           for 2.5.0 release
2345
2346 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2347
2348         * device/include/z80/stdio.h,
2349         * device/include/z80/string.h: removed these highly incomplete files so
2350           SDCC can use the default ones in device/include/
2351
2352 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2353
2354         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2355         gcc warning.
2356         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2357         fix sdcpp warnings.
2358
2359 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2360
2361         * device/include/malloc.h: removed redundant __reentrant prototypes
2362         * device/lib/_mullong.c: added working xstack variant in asm (C version
2363           doesn't pass regression tests)
2364         * device/lib/bpx.c: used __data and made bpx char for mcs51
2365         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2366           (createFunction): fixed bug with xstackPtr
2367         * src/SDCCcse.c: corrected comments
2368         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2369           (killDeadCode, eBBlockFromiCode): removed unused code
2370         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2371           corrected comments
2372         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2373           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2374           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2375           (genModOneByte): fixed warning in MSVC
2376         * src/mcs51/main.c (): added comments
2377         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2378
2379 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2380
2381         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2382
2383 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2384
2385         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2386
2387 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2388
2389         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2390         characters arrays of larger size than the declared one.
2391
2392 2005-04-10 Borut Razem <borut.razem AT siol.net>
2393
2394         * src/pic/gen.c (genInline),
2395           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2396           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2397           (findNextInstruction), (findPrevInstruction),
2398           (findInstructionUsingLabel),
2399           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2400         * src/pic/pcode.c (findLabel): added missing '\n'
2401         * src/src.dsp: added SDCCdwarf2.c to the project
2402
2403 2005-04-09 Borut Razem <borut.razem AT siol.net>
2404
2405         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2406
2407 2005-04-08 Raphael Neider <rneider AT web.de>
2408
2409         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2410           into the chain after a given one) and mergeDefmapSymbols (combine
2411           defmap entries for each symbol per pcode)
2412         * (createDefmap): have defmap entries merged in the end
2413         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2414           a symbol before replacing one access type's symbol, merge symbols in
2415           the end (replacement symbol might already have an entry)
2416         * (assignValnums): keep reference to written WREG intact
2417
2418 2005-04-08 Raphael Neider <rneider AT web.de>
2419
2420         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2421           Alpha)
2422
2423 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2424
2425         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2426         bytes
2427
2428 2005-04-07 Raphael Neider <rneider AT web.de>
2429
2430         * device/include/pic16/usart.h: added compatibility defines for
2431           devices with more than one USART
2432         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2433
2434 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2435
2436         * device/lib/Makefile.in: updated for port specific include
2437
2438 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2439
2440         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2441
2442 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2443
2444         * device/include/8051.h,
2445         * device/include/8052.h,
2446         * device/include/at89S8252.h,
2447         * device/include/at89c55.h,
2448         * device/include/at89x051.h,
2449         * device/include/at89x51.h,
2450         * device/include/at89x52.h,
2451         * device/include/mcs51reg.h,
2452         * device/include/reg51.h,
2453         * device/include/reg764.h,
2454         * device/include/regc515c.h,
2455         * device/include/sab80515.h: (re)moved these 12 files
2456         * device/include/mcs51/8051.h,
2457         * device/include/mcs51/8052.h,
2458         * device/include/mcs51/at89S8252.h,
2459         * device/include/mcs51/at89c55.h,
2460         * device/include/mcs51/at89x051.h,
2461         * device/include/mcs51/at89x51.h,
2462         * device/include/mcs51/at89x52.h,
2463         * device/include/mcs51/mcs51reg.h,
2464         * device/include/mcs51/reg51.h,
2465         * device/include/mcs51/reg764.h,
2466         * device/include/mcs51/regc515c.h,
2467         * device/include/mcs51/sab80515.h: and added them here
2468
2469 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2470
2471         * device/include/stdarg.h: changed SDCC specific keywords to double
2472           underlined form.
2473         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2474           mcs51 and ds390.
2475         * device/include/hc08/mc68hc908gp32.h,
2476         * device/include/hc08/mc68hc908jb8.h,
2477         * device/include/hc08/mc68hc908jkjl.h,
2478         * device/include/hc08/mc68hc908qy.h: fixed comments
2479         * device/include/mcs51/README: updated
2480         * device/include/mcs51/c8051f120.h: added PINRSF
2481         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2482         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2483           amidst code. Also inline is not supported.
2484
2485 2005-04-06 Raphael Neider <rneider AT web.de>
2486
2487         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2488         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2489           callers stack/frame pointers
2490
2491 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2492
2493         * device/include/pic16/usart.h: added, missing in previous commit,
2494         * device/include/pic16/adc.h: fixed typo,
2495         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2496         commit,
2497         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2498         <p18fxxx.inc>
2499         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2500         uninitialized because a bug appears with gplink
2501         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2502         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2503         complains for unrecognised option
2504
2505 2005-04-05 Raphael Neider <rneider AT web.de>
2506
2507         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2508           structs as well (using memcpy)
2509         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2510           on ISRs (GOTO has no label)
2511         * src/pic16/device.h: added OF_OPTIMIZE_DF
2512         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2513           new data flow analysis/optimization
2514         * src/pic16/pcode.c: added (prototypes for and implementation of)
2515           dataflow analysis functions, fixed pCodeInstructions' inCond and
2516           outCond values, made RCALL a branch instruction
2517         * (pic16_unlinkpCode): keep C line if possible
2518         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2519           C line moved if possible
2520         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2521         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2522           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2523         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2524           new flow)
2525         * (pic16_getJumptabpCode): NEW, needed in...
2526         * (LinkFlow): fixed handling of jumptables, calls and conditional
2527           branches
2528         * (pic16_InsertCommentAfter): NEW
2529         * (pic16_pCodeReplace): made verbose and flow preserving
2530         * (AnalyzeFlow): added call to data flow analysis
2531         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2532         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2533         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2534
2535 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2536
2537         * src/SDCCast.c (decorateType): fixed bug #1105626
2538
2539 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2540
2541         * device/include/asm/pic16/features.h,
2542         * pic18f*.h headers,
2543         * device/include/pic16/adc.h,
2544         * device/include/pic16/delay.h,
2545         * device/include/pic16/i2c.h,
2546         * device/include/pic16/malloc.h,
2547         * device/include/pic16/stdio.h,
2548         * device/include/pic16/stdlib.h,
2549         * device/include/pic16/string.h,
2550         * device/lib/pic16/libc/stdio/printf_tiny.c,
2551         * device/lib/pic16/libc/stdio/printf_small.c,
2552         * device/lib/pic16/libc/stdio/strmgpsim.c,
2553         * device/lib/pic16/libc/stdio/strmmssp.c,
2554         * device/lib/pic16/libc/stdio/strmusart.c,
2555         * device/lib/pic16/libc/stdio/vfprintf.c,
2556         * device/lib/pic16/libc/stdlib/ltoa.c,
2557         * device/lib/pic16/libc/stdlib/putchar.c,
2558         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2559         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2560         * device/lib/pic16/libc/stdlib/memchrram.c,
2561         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2562         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2563         * device/lib/pic16/libio/adc/adcbusy.c,
2564         * device/lib/pic16/libio/adc/adcread.c,
2565         * device/lib/pic16/libio/adc/adcsetch.c,
2566         * device/lib/pic16/libio/usart/ubaud.c,
2567         * device/lib/pic16/libio/usart/ubusy.c,
2568         * device/lib/pic16/libio/usart/udrdy.c,
2569         * device/lib/pic16/libio/usart/uopen.c,
2570         * device/lib/pic16/libio/usart/uputc.c,
2571         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2572         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2573         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2574         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2575         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2576         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2577         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2578         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2579         specific keywords to double underlined form,
2580         * device/lib/pic16/libc/Makefile.rules,
2581         * device/lib/pic16/libsdcc/Makefile.rules,
2582         * device/lib/pic16/libm/Makefile,
2583         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2584         to compile with C standard set in Makefile.common
2585         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2586         rand.c and crc.c in compilation process,
2587         * device/lib/pic16/libsdcc/int/divuint.c,
2588         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2589         `c' from signed to unsigned,
2590         * device/lib/pic16/startup/crt0.c,
2591         * device/lib/pic16/startup/crt0i.c,
2592         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2593         keywords to double underlined form, bug fixes in _do_cinit function
2594         which prevented the correct initialization of the .idata segment,
2595         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2596         core to enter a infinite loop
2597         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2598
2599 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2600
2601         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2602
2603 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2604
2605         * device/include/Makefile.in: add support for hc08 subdirectory
2606         * device/include/hc08/: new subdirectory
2607         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2608         Lucas Loizaga, thanks!
2609         * device/include/hc08/mc68hc908qy.h,
2610         * device/include/hc08/mc68hc908gp32.h,
2611         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2612         their own directory. Changed internal macro names to use the compiler
2613         reserved namespace. Changed SDCC specific keywords to double
2614         underlined form.
2615         * device/include/math.h,
2616         * device/include/malloc.h,
2617         * device/include/stdarg.h,
2618         * device/include/stdbool.h
2619         * device/include/string.h,
2620         * device/include/tinibios.h,
2621         * device/include/ds400rom.h,
2622         * device/include/8051.h,
2623         * device/include/8052.h,
2624         * device/include/80c51xa.h,
2625         * device/include/at89c55.h,
2626         * device/include/at89S8252.h,
2627         * device/include/at89x51.h,
2628         * device/include/at89x52.h,
2629         * device/include/ds80c390.h,
2630         * device/include/reg764.h,
2631         * device/include/regc515c.h,
2632         * device/include/sab80515.h,
2633         * device/include/mcs51/c8051f000.h,
2634         * device/include/mcs51/c8051f018.h,
2635         * device/include/mcs51/c8051f020.h,
2636         * device/include/mcs51/c8051f040.h,
2637         * device/include/mcs51/c8051f060.h,
2638         * device/include/mcs51/c8051f120.h,
2639         * device/include/mcs51/c8051f300.h,
2640         * device/include/mcs51/c8051f310.h,
2641         * device/include/mcs51/c8051f320.h,
2642         * device/include/mcs51/c8051f330.h,
2643         * device/include/mcs51/c8051f350.h,
2644         * device/include/z180.h: Changed SDCC specific keywords to double
2645         underlined form.
2646
2647 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2648
2649         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2650         18F4455,
2651         * (pic16_assignConfigWordValue): disable testing of configuration
2652         register value with config mask,
2653         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2654         function with port->fun_prefix,
2655         * (genFunction): when generating a naked interrupt function never
2656         create an absolute segment placed in interrupt vector address, place
2657         the actual interrupt function at IVA instead, when an interrupt
2658         function is generated with unspecified interrupt then do not create
2659         the absolute section,
2660         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2661         code for generating a call to generic pointer get/put function with
2662         a call to function pic16_callGenericPointer(),
2663         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2664         the call to the generic pointer get/put functions with prefixing the
2665         function name with port->fun_prefix,
2666         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2667         * src/pic16/main.c (_process_pragma): prefix function with
2668         port->fun_prefix,
2669         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2670         calling assembler, old 18Fxxxx macro is deprecated,
2671         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2672         PC_ASMDIR in while condition,
2673         * (findInstruction): add PC_ASMDIR in while condition,
2674         * (buildCallTree): prefix main with port->fun_prefix,
2675         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2676         identifier for variable with banked access in instructions BTFSS,
2677         BTFSC, BCF, BSF, BTG
2678         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2679         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2680         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2681         perform optimization when enviroment variable NO_REG_OPT is set,
2682         * (insideLRBlock): NEW, return 1 if register is inside an
2683         INF_LOCALREGS block,
2684         * (RemoveRegFromLRBlock): remove a register that is completely
2685         eliminated by register optimization, but it is still left in local
2686         register store/restore in/from stack block,
2687         * (Remove2pcodes): after removing register, check to see if it
2688         should be removed from local register store/restore in/from stack
2689         block,
2690         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2691         DUMMY_READ_VOLATILE,
2692
2693         * device/include/pic16/adc.h: minor prototype modifications and
2694         update,
2695         * device/include/pic16/malloc.h: added GPL notice various
2696         modifications,
2697         * device/include/pic16/stdint.h: NEW, standard header for ints
2698         * device/include/pic16/delay.h: NEW, header for delay functions,
2699         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2700         delay1mtcy,
2701         * device/include/pic16/signal.h: NEW, header providing helper macros
2702         for implementing signal handlers,
2703         * device/include/pic16/stdio.h: added prototypes for functions,
2704         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2705         prototypes for stdin and stdout, added macro PUTCHAR to
2706         automatically implement putchar function prototype,
2707         * device/include/pic16/usart.h: modified and updated USART library,
2708         * device/lib/pic16/libio/adc/,
2709         * device/lib/pic16/libio/i2c: some modifications to improve library
2710         performance,
2711         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2712         family of functions,
2713         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2714         family of functions and other sources,
2715         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2716         of the PIC18Fxx[28] devices,
2717         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2718         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2719         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2720         _do_cinit function, because the previous failed when local variables
2721         where not placed in the same memory bank,
2722         * device/lib/pic16/libsdcc/char/: various modifications to improve
2723         library performance,
2724         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2725         information on the new functions of the c library and more...
2726
2727 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2728
2729         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2730
2731 2005-03-26 Raphael Neider <rneider AT web.de>
2732
2733         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2734           if condition == CARRY)
2735         * (genCmp): adapted to new genSkipc semantics
2736         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2737           on rIfx (genCmp was broken)
2738
2739 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2740
2741         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2742         * src/z80/main.c (_keywords[]),
2743         * src/SDCCglobal.h (struct options),
2744         * src/SDCC.y,
2745         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2746         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2747         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2748         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2749         always available in leading double underscore form. The C99 support is
2750         mostly missing, but it's a start.
2751         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2752         reserved identifier "__data".
2753
2754 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2755
2756         * src/mcs51/peeph.def: fixed bug 1170013
2757
2758 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2759
2760         * device/include/mcs51reg.h: fixed bug 842007
2761
2762 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2763
2764         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2765         last time.
2766
2767 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2768
2769         * src/port.h (struct PORT),
2770         * src/avr/ralloc.c (avr_assignRegisters),
2771         * src/avr/main.c,
2772         * src/ds390/ralloc.c (ds390_assignRegisters),
2773         * src/ds390/main.c,
2774         * src/hc08/ralloc.c (hc08_assignRegisters),
2775         * src/hc08/main.c,
2776         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2777         * src/mcs51/main.c,
2778         * src/pic/ralloc.c (pic14_assignRegisters),
2779         * src/pic/main.c,
2780         * src/pic16/ralloc.c (pic16_assignRegisters),
2781         * src/pic16/main.c,
2782         * src/xa51/ralloc.c (xa51_assignRegisters),
2783         * src/xa51/main.c,
2784         * src/z80/ralloc.c (z80_assignRegisters),
2785         * src/z80/ralloc.h,
2786         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2787         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2788         * src/SDCCcse.h,
2789         * src/SDCCdflow.c (computeDataFlow),
2790         * src/SDCCdflow.h,
2791         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2792         * src/SDCCloop.h,
2793         * src/SDCCcflow.c (*),
2794         * src/SDCCcflow.h,
2795         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2796         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2797         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2798         immedDom() returning wrong block; probably fixes bug #1160833)
2799
2800 2005-03-20 Borut Razem <borut.razem AT siol.net>
2801
2802         * support/scripts/inc2h.pl: WIN32 port
2803
2804 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2805
2806         * device/lib/makefile.in: added abs.c and labs.c
2807
2808 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2809
2810         * device/include/stdint.h: added
2811         * device/lib/abs.c: added
2812         * device/lib/labs.c: added
2813         * device/include/stdlib.h: added abs() and labs() prototypes
2814         * device/lib/libsdcc.lib: added abs and labs
2815         * device/include/float.h,
2816         * device/lib/_fsmul.c,
2817         * device/lib/printf_fast.c,
2818         * device/lib/printf_tiny.c: updated comments
2819
2820 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2821
2822         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2823         bug #1164313
2824
2825 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2826
2827         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2828         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2829
2830 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2831
2832         * device/lib/printf_large.c: removed inline assembly for portability and
2833           readability. Use printf_fast if speed or size are more important.
2834         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2835         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2836
2837 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2838
2839         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2840         prevent compiler warning
2841
2842 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2843
2844         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2845         moved to level 0 and declared as static. Also they are explicit
2846         placed in access bank. This was necessery because some times they
2847         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2848         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2849         optimizations. Currently only compare to unsigned char is implemented,
2850         * src/pic16/gen.c: added fReturnIdx array,
2851         * (struct resolvedIfx) is moved to gen.h and made public,
2852         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2853         * (aopForSym): added an optimization to directly store in stack of
2854         the operand of a SEND iCode,
2855         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2856         but as registers instead (AOP_REG) using the fReturnIdx array,
2857         * (pic16_freeAsmop): remove the freed register from the
2858         _G.sregsAlloc field,
2859         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2860         a compare of 'WREG',
2861         * (pic16_popGetTempRegCond): changed function prototype, now
2862         function takes also a bitVector argument v which holds the current
2863         set of registers that are allocated for stack access by aopForSym,
2864         registers allocated in aopForSym for accessing stack symbols are not
2865         any more part of the functions usedRegs field,
2866         * (genCall): some times aopOp is called for a stack variable to be
2867         send, aopForSym might perform the push, if this is true make sure
2868         that genCall doesn't push the variable twice by testing _G.resDirect,
2869         * (genFunction): changed testing for unspecified interrupt number
2870         from 256 to INTNO_UNSPEC,
2871         * modified selection scheme of frame pointer generation. Previously
2872         if function did use local registers a frame pointer was generated,
2873         now a frame pointer is generated only if function has arguments
2874         (that need PLUSW2 register access), or has stack arguments, or the
2875         compiler is not instructed to omit the frame pointer,
2876         * (genEndFunction): before restoring local registers that were saved
2877         in the function preamble, also restore the registers that *might*
2878         have been allocated for stack access,
2879         * (genRet): removed some old comments,
2880         * (genCmp, the active (RN's) version): added a call to the
2881         pic16_genCmp_special function to perform the compare with a more
2882         robust and optimized way,
2883         * (genInline): a feature has been added in inline code generation,
2884         which allows a wildcard variable substitution when writing inline
2885         assembly. Code is incomplete and experimental therefore undocumented,
2886         * (genCast): changed order of aopOp for result and right to allow
2887         aopForSym to directly load the result if possible,
2888         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2889         perform an optimized compare on some selected special occasions,
2890         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2891         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2892         generate an IVT any more,
2893         * src/pic16/main.c (pic16_optionsTable): added command line option
2894         --optimize-cmp,
2895         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2896         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2897         macros,
2898         * src/pic16/NOTES: Raphael Neider added in list of active developers
2899         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2900         jumptable_end to prevent bug #,
2901         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2902         inCond and outCond fields,
2903         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2904         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2905         turn off register spilling,
2906         * (packRegsForOneUse): synced with other ports' versions although it
2907         is not used currently,
2908         * (pic16_packRegisters): added an optimization while reading
2909         structure bitfields, some registers may be saved (malloc code is
2910         decreased by 80 bytes)
2911
2912 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2913
2914         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2915         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2916         this can be optimized more?
2917
2918 2005-03-10 Raphael Neider <rneider AT web.de>
2919
2920         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2921           genNearPointerGet): (hopefully) fixed access to bitfields via
2922           pointers (p->bitN = x; and x = p->bitN; failed)
2923
2924 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2925
2926         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2927
2928 2005-03-09 Raphael Neider <rneider AT web.de>
2929
2930         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2931
2932 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2933
2934         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2935         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2936           (regTypeNum): set REG_BIT type if necessary
2937         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2938         * support/regression/tests/critical.c: check bug 1144613
2939
2940 2005-03-02 Raphael Neider <rneider AT web.de>
2941
2942         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2943
2944 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2945
2946         * src/avr/ralloc.c (serialRegAssign),
2947         * src/ds390/ralloc.c (serialRegAssign),
2948         * src/hc08/ralloc.c (serialRegAssign),
2949         * src/mcs51/ralloc.c (serialRegAssign),
2950         * src/pic/ralloc.c (serialRegAssign),
2951         * src/pic16/ralloc.c (serialRegAssign),
2952         * src/xa51/ralloc.c (serialRegAssign),
2953         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2954
2955 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2956
2957         * src/SDCCast.c (decorateType): fixed bug 1124787
2958
2959 2005-02-20 Hubert Sack <sack AT digiplan.de>
2960         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2961
2962         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2963         patch #1121755
2964
2965 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2966
2967         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2968         to keep the correct label reference count when adding/removing references
2969         to labels. A peephole file using this is appended to patch #1144962.
2970
2971 2005-02-14 Raphael Neider <rneider AT web.de>
2972
2973         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2974         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2975         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2976           retrievals of result operand's value on assignment
2977
2978 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2979
2980         * device/include/pic16/string.h: modified prototype for memccpy()
2981         to memccpy(void *, void *, char, size_t)
2982         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2983         check whether to omit frame pointer or not,
2984         * (genInline): convert all occurences of "\n" to LF in inline
2985         assembler blocks, this helps formatting the inline text,
2986         * (pic16_loadFSR0): modified prototype,
2987         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2988         removed some 8051 legacy code,
2989         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2990         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2991         before allocating temporary registers in functions,
2992
2993 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2994
2995         * support/regression/tests/bitvars.c: corrected the "fix"
2996
2997 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2998
2999         * support/regression/tests/bitvars.c,
3000         * support/regression/tests/bitwise.c,
3001         * support/regression/tests/rotate.c: "fixed" problems on Alpha
3002
3003 2005-02-10 Raphael Neider <rneider AT web.de>
3004
3005         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3006           different size for Alpha
3007         * src/pic16/gen.c (genCmpEq) : improved compare with 0
3008
3009 2005-02-09 Raphael Neider <rneider AT web.de>
3010
3011         * src/SDCC.lex(doPragma) : save and restore warning options as well
3012           (also added new stack plus clone- and copyAndFreeSDCCERRG())
3013         * have #pragma less_pedantic set the errorlevel to WARNING
3014           (fixes #1117001)
3015         * (cloneOptimize) : fixed wrong malloc's size
3016         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3017           facilitate correct handling of #pragma (save|restore)
3018
3019 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3020
3021         * src/mcs51/gen.c: removed non-standard C nameless struct/union
3022
3023 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3024
3025         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3026
3027 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3028
3029         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3030
3031 2005-02-02 Raphael Neider <rneider AT web.de>
3032
3033         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3034         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3035         * (pic16_storeForReturn): fixed to allow returning function pointers
3036         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3037         * device/include/pic16/{stddef.h,stdbool.h}: added
3038
3039 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3040
3041         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3042
3043 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3044
3045         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3046         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3047          appeared to be required
3048
3049 2005-01-31 Borut Razem <borut.razem AT siol.net>
3050
3051         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3052           include/mcs51 and include/z80 directories to the package
3053
3054 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3055
3056         * src/hc08/gen.c (genFunction): fixed bug #1112752
3057
3058 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3059
3060         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3061
3062 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3063
3064         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3065
3066 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3067
3068         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3069
3070 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3071
3072         * device/include/c8051fxxx.h: removed these 6 files
3073         * device/include/mcs51/c8051fxxx.h: added these 11 new files
3074
3075 2005-01-26 Raphael Neider <rneider AT web.de>
3076
3077         * src/pic16/gen.c (genAssign): fixed assignment from longs
3078           in codespace (were cut to three bytes)
3079         * (genDummyRead): implemented (except for CODESPACE...),
3080           fixed bug #1108575
3081         * src/pic16/glue.c (emitStatistics): beautified
3082         * device/lib/pic16/libm/Makefile: added include path
3083
3084 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3085
3086         * src/z80/gen.c (aopPut): fixed bug #1103902
3087
3088 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3089
3090         * device/lib/expf.c: fixed bug #1095792
3091
3092 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3093
3094         * device/lib/pic16/libm: added Math library sources
3095
3096 2005-01-24 Raphael Neider <rneider AT web.de>
3097
3098         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3099           to enable upcast to pCodeOpReg2 (there is no type tag to
3100           differenciate the two and pic16_popGet2p cast into PCOR2)
3101         * src/pic16/main.c (_process_pragma): fixed another malloc bug
3102           (sizeof(sectNames) changed to sizeof(sectName))
3103           Both patches fix segfaults under MinGW.
3104
3105 2005-01-23 Raphael Neider <rneider AT web.de>
3106
3107         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3108           Safe_[mc]?alloc()'ed variables
3109         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3110           of (byte sized) temporaries (assign them to WREG for now)
3111         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3112           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3113           this might fix SIGSEGVs on MinGW...
3114         * src/SDCCopt.c (killDeadCode): restored original behaviour
3115           (volatile operands might get thrown away though)
3116
3117 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3118
3119         * src/pic16/gen.c: fixed bug #1106975,
3120         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3121         pointer update, INTCON is saved, global interrupts are disabled and
3122         restored after updateing TOS.
3123         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3124         * added function attribute 'shadowregs' to take advantage of shadow
3125         registers,
3126         * added function attribute 'wparam' as an alternative to the wparam
3127         pragma,
3128         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3129         user declares a non-ISR function as 'shadowregs',
3130         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3131
3132 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3133
3134         * .version: bumped version number to 2.4.8
3135         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3136         pic16 port,
3137         * device/lib/pic16/libio/i2c/: I2C module support library,
3138         * device/include/pic16/i2c.h: I2C support library header,
3139         * device/lib/pic16/libc/stdio/: standard IO support sources,
3140         * (printf_small.c): printf_small() source, supports float print,
3141         * (printf_tiny.c): printf_tiny() source, does not support floats,
3142         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3143         enable global optimizations for entire library source, other
3144         Makefiles in the source tree are also modified to reflect this,
3145         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3146         function,
3147         * doc/sdccman.lyx: updated to reflect new changes,
3148         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3149         sym->onStack if-case,
3150         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3151         sbit, idata, _idata, xdata, _xdata,
3152         * added pragma library, to link an external library, (see doc),
3153         * removed command line options, --pomit-config-words, --pomit-ivt,
3154         --pleave-reset-vector,
3155         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3156         when calling assembler to reflect memory model used, also define
3157         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3158         reflect stack model used,
3159         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3160         on stack return NULL,
3161
3162 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3163
3164         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3165           of the operands is volatile. Fixes #1020220
3166
3167 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3168
3169         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3170         * (OptimizeRegUsage): make sure that there is really no other flow where
3171           the first pCode is used
3172
3173 2005-01-22 Raphael Neider <rneider AT web.de>
3174
3175         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3176           to fix #1106967 (pCode->seq are not set up correctly)
3177
3178 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3179
3180         * src/SDCCglue.c (glue): make sure code area is declared before the
3181         static initialization area.
3182
3183 2005-01-21 Raphael Neider <rneider AT web.de>
3184
3185         * device/lib/Makefile.in: fixed test for pic16 install dir
3186         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3187           optimizations
3188         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3189           added --optimize-goto compiler switch and pragma wparam documentation
3190         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3191         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3192           and PRODH closing bug #1071770 (peephole optimizer)
3193
3194 2005-01-19 Raphael Neider <rneider AT web.de>
3195
3196         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3197           cmdLine buffers (used when calling sdcpp...) are large enough
3198           (MAX_PATH=256 truncates arguments leading to system halts when
3199           used in MinGW...)
3200         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3201         * (genUminus): rewritten to for efficiency
3202         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3203           used uninitialized in some cases)
3204         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3205           copy the third byte from the int -- now assumes 0x80 (data memory)
3206         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3207           operands (genAddLit expects the iCode's operands to swapped as
3208           well), fixed leftover bytes (crashed for short left operands)
3209         * (pic16_genMinusDec): performance improvements, removed false
3210           PIC14 emitSKPNCs
3211         * (pic16_genMinus): fixed to cope with differently sized operands
3212         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3213           for --obanksel > 1
3214         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3215         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3216           new banksel optimization
3217         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3218           analysis for temporary registers (segfaults...)
3219         * src/pic16/peeph.def: added rule
3220
3221 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3222
3223         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3224         which converts a float number to its ASCII representation
3225         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3226         functions to convert the fractional and integer part of a float to ASCII,
3227         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3228         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3229         ram
3230         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3231         _STATMEM macros,
3232         * device/include/pic16/adc.h: added GPL info,
3233         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3234         a pCodeOp as tested operand,
3235         * (genNearPointerGet): optimized bit testing, does not use
3236         intermediate register for bit value, test directly instead with
3237         BTFSS, BTFSC, works only for single bits,
3238         * (genpic16Code): dump the name of the iCode in the asm,
3239         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3240         renamed to pic16_decodeOp,
3241         * (serialRegAssign): do not allocate a temporary register for iCode
3242         sequences that test a single bit for 1/0
3243
3244 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3245
3246         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3247         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3248         access stack and frame pointers. They are initially assigned to
3249         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3250         accessing SFRs. Updated all occurences of modification of stack or
3251         frame pointer in gen.c and pcode.c,
3252         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3253         assigning of a literal value to pointers,
3254         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3255         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3256         selected
3257
3258 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3259
3260         * doc/sdccman.lyx: update documentation about stack pragma, added
3261         some info for stack memory models
3262
3263 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3264
3265         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3266
3267 2005-01-08 Raphael Neider <rneider AT web.de>
3268
3269         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3270           udata sections to fix bug #1097823
3271
3272 2005-01-05 Raphael Neider <rneider AT web.de>
3273
3274         * src/pic16/gen.c (genGenericShift): added handling of differently
3275           sized left operand and result
3276
3277 2005-01-04 Raphael Neider <rneider AT web.de>
3278
3279         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3280         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3281           to hold the condition bit)
3282         * added new version of genCmp (old code available via #define)
3283         * added new version of genShiftLeft/genShiftRight in a generic
3284           way, now supports shifting by negative values
3285         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3286           shiftCount (expected by genGenericShift)
3287         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3288         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3289           dump
3290         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3291           is an invalid literal too...)
3292
3293 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3294
3295         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3296         from Raphael Neider,
3297         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3298         for 8-bit literals. This fixes some literal operands which are sign
3299         extended to 16-bits ints when instruction needs only 8-bits.
3300
3301 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3302
3303         * device/lib/logf.c: added mcs51 assembly version
3304         * device/lib/expf.c: added mcs51 assembly version
3305         * device/lib/_logexpf.c: new shared asm code for expf and logf
3306         * device/include/math.h: add defines for assembly math library
3307         * device/lib/Makefile.in: build new _logexpf.c
3308         * device/lib/libfloat.lib: use new _logexpf.c
3309
3310 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3311
3312         * src/pic/device.c
3313         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3314           device types which have less than 0x7f registers.
3315
3316 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3317
3318         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3319
3320 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3321
3322         * device/lib/printf_fast.c: only build on supported arch.
3323         * device/lib/printf_tiny.c: only build on supported arch.
3324         * device/lib/printf_fast_f.c: only build if asm float lib
3325         * device/lib/_fsget1arg.c: only build if asm float lib
3326         * device/lib/_fsget2args.c: only build if asm float lib
3327         * device/lib/_fsnormalize.c: only build if asm float lib
3328         * device/lib/_fsreturnval.c: only build if asm float lib
3329         * device/lib/_fsrshift.c: only build if asm float lib
3330         * device/lib/_fsswapargs.c: only build if asm float lib
3331         * device/include/stdio.h: don't provide print_fast,
3332           print_fast_f, print_tiny prototypes if --xstack used
3333
3334 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3335
3336         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3337         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3338           to the SOURCES
3339
3340 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3341
3342         * device/lib/printf_fast_f.c: same as printf_fast, but
3343           with floating point enabled
3344         * device/lib/printf_fast.c: minor tweaks
3345         * device/include/stdio.h: add printf_fast_f
3346
3347 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3348
3349         * src/SDCCmain.c: make --float-reent default for mcs51
3350         * device/lib/_fsadd.c: added mcs51 assembly version
3351         * device/lib/_fssub.c: added mcs51 assembly version
3352         * device/lib/_fsmul.c: added mcs51 assembly version
3353         * device/lib/_fsdiv.c: added mcs51 assembly version
3354         * device/lib/_fseq.c: added mcs51 assembly version
3355         * device/lib/_fsneq.c: added mcs51 assembly version
3356         * device/lib/_fsgt.c: added mcs51 assembly version
3357         * device/lib/_fslt.c: added mcs51 assembly version
3358         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3359         * device/lib/Makefile.in: add _fscmp to build
3360         * device/lib/libfloat.lib: add _fscmp to build
3361
3362 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3363
3364         * device/lib/_fs2slong.c: added mcs51 assembly version
3365         * device/lib/_fs2sint.c: added mcs51 assembly version
3366         * device/lib/_fs2schar.c: added mcs51 assembly version
3367         * device/lib/_fs2ulong.c: added mcs51 assembly version
3368         * device/lib/_fs2uint.c: added mcs51 assembly version
3369         * device/lib/_fs2uchar.c: added mcs51 assembly version
3370         * device/lib/_slong2fs.c: added mcs51 assembly version
3371         * device/lib/_sint2fs.c: added mcs51 assembly version
3372         * device/lib/_schar2fs.c: added mcs51 assembly version
3373         * device/lib/_ulong2fs.c: added mcs51 assembly version
3374         * device/lib/_uint2fs.c: added mcs51 assembly version
3375         * device/lib/_uchar2fs.c: added mcs51 assembly version
3376         * device/include/float.h: added #define to select asm vs c
3377
3378 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3379
3380         * device/lib/printf_fast.c: improvements to float output
3381         * device/include/float.h: add defines for assembly float library
3382         * device/lib/_fsget1arg.c: receive 1 float arg
3383         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3384         * device/lib/_fsnormalize.c: normalize a float
3385         * device/lib/_fsreturnval.c: return float, various helper routines
3386         * device/lib/_fsrshift.c: right shift a float's mantissa
3387         * device/lib/_fsswapargs.c: swap 2 floats
3388         * device/lib/Makefile.in: build these 6 new files for mcs51
3389         * device/lib/libfloat.lib: add these 6 files to the library
3390
3391 2004-12-26 Borut Razem <borut.razem AT siol.net>
3392
3393         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3394           built by gcc 3.4.2
3395
3396 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3397
3398         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3399           and fully reentrant and register bank neutral.
3400         * device/lib/printf_fast.c: added float (not enabled by default),
3401           added compact/slower integer (also not enabled by default),
3402           improved size/speed of fast integer code, other minor changes
3403         * device/include/stdio.h, device/lib/Makefile.in,
3404           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3405
3406 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3407
3408         * src/pic16/pcode.c: declaring variables other than at the start of a
3409           block is not supported in C by VC6.
3410
3411 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3412
3413         * applied a previous patch from Raphael Neider that wasn't included
3414         in the previous commits, which fixes infinite loops within jumptable
3415         improvements,
3416         * made some fixes that previous patches introduced
3417
3418 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3419
3420         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3421         that fixes an issue with AOP_PCODE asmop's offset,
3422         * (pic16_popCopyReg): update instance field too,
3423         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3424         function of pic port,
3425         * (genCmp, genAnd, genAssign),
3426         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3427
3428 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3429
3430         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3431         variables initial values to idata section,
3432         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3433         variables in some functions. This utilizes parmBytes field of iCode
3434         structure to hold the offset of the variable in stack. (might be
3435         able to use the stack field too?)
3436         * applied patch from Raphael Neider # ### , # ###
3437         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3438         variable initial values in idata section,
3439         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3440         for static variables with initial value
3441         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3442         applied fix in while loop from Raphael Neider.
3443
3444 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3445
3446         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3447         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3448         * src/ds390/ralloc.c (serialRegAssign): spill bits
3449         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3450         * support/Util/SDCCerr.c,
3451         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3452         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3453         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3454
3455 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3456
3457         * device/include/sdcc-lib.h: inserted LGPL, added includes
3458           asm/ds390/features.h and asm/mcs51/features.h
3459         * device/include/asm/default/features.h,
3460         * device/include/asm/gbz80/features.h,
3461         * device/include/asm/z80/features.h: added empty _AUTOMEM
3462           and _STATMEM
3463         * device/include/asm/ds390/features.h,
3464         * device/include/asm/mcs51/features.h: added files with defines for
3465           _AUTOMEM and _STATMEM indicating automatic and static storage class
3466         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3467         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3468         * src/SDCCicode.c (geniCodeCast),
3469         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3470         * src/SDCCloop.c (loopInduction): removed unused variable lr
3471         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3472           to convertToFcall to include char modulo (RFE 1065037), added check
3473           if left operand is unsigned and use abs of literal value
3474         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3475           as it doesn't work after conversion from peephole.def to peephole.rul
3476         * src/mcs51/gen.c (toBoolean): added check for size,
3477           (genModOneByte): optimized code for signed char modulo a literal
3478           power of 2 (thanks to Hubert Sack),
3479           (genRRC): removed unnecessary "clr c",
3480           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3481         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3482           jump optimization,
3483           swapped rules 256.c and 256.d,
3484           extended 256.d by using new multiple checks (thanks Erik),
3485           added rules 256.e and 256.f,
3486           updated rule 261.a and 261.b to new generated code
3487         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3488
3489 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3490
3491         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3492           induction related bugs, including first part of bug #1074377
3493
3494 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3495
3496         * applied patch from bug-report #1076292,
3497         * applied patches for genAnd and Goto-optimizations for Raphael
3498         Neider,
3499         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3500         dump a less iCode information,
3501         * src/pic16/device.h (pic16_options_t): added field debgen,
3502         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3503         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3504         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3505         puclic,
3506         * (various functions): added macros FENTRY and FENTRY2 to functions,
3507         to emit function prologue,
3508         * (various functions): fixed indentation,
3509         * (genNearPointerGet): fixed loading of FSR0,
3510         * (genPackBits): applied patch from Raphael Neider to fix updating
3511         of FSR0 and touching only the modified bits,
3512         * src/pic16/genarith.c (various functions): added macros FENTRY to
3513         emit function prologue in comments,
3514         * src/pic16/pcode.h: added functions debugf2, debugf3,
3515         * src/pic16/ralloc.c: partial fix for packForPush caused
3516         segmentation fault,
3517
3518 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3519
3520         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3521           <stsp AT users.sourceforge.net> with reversed byte order
3522         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3523
3524 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3525
3526         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3527           bug #1074377
3528         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3529         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3530
3531 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3532
3533         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3534
3535 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3536
3537         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3538           conditions,
3539           (setFromConditionArgs): friendly operand parser for peephole rules,
3540           (operandBaseName, operandsNotRelated): new peephole condition
3541           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3542           architecture specific register naming into account, handles n-way
3543           comparisons, and supports quoted literals
3544         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3545
3546 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3547
3548         * src/mcs51/peeph.def: fixed bug #1076940
3549
3550 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3551
3552         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3553
3554 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3555
3556         Adding support for replacing ljmps with sjmps in jumptables
3557         generated for switch statements. For now you need to set the
3558         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3559         Now 4 algorithms for mcs51 jumptable generation are used:
3560         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3561         addresses loaded pc-relative for up to 112 cases and stack-pushing
3562         target addresses loaded with offset from dptr for up to 256 cases.
3563
3564         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3565         * src/mcs51/main.c: adapted constants for switch table generation
3566         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3567
3568 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3569
3570         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3571         * support/regression/tests/bug1057979.c: added test for bug 1073386
3572
3573 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3574
3575         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3576         compilers
3577
3578 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3579
3580         * src/pic16/device.h,
3581         * src/pic16/genarith.c,
3582         * src/pic16/glue.c,
3583         * src/pic16/main.c,
3584         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3585
3586 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3587
3588         Large cummulative patch for pic16 port.
3589         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3590         to call when a stack overflow occurs,
3591         * (malloc.h): added CVS Id tag,
3592         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3593         variable,
3594         * added libc directory. The current version of LibC contains string
3595         functions, ctype functions and macros and some functions of the
3596         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3597         be extensively tested in the future. Standard disclaimer here.
3598         Library is not automatically build yet. But one can build it by
3599         invoking 'make' inside the libc directory.
3600         * added ADC library under libio. Preliminary version yet.
3601
3602         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3603         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3604         aopForRemat() now and not by pic16_aopOp(),
3605         * (pic16_popGetTempReg): removed warning messgae when allocating
3606         temporary registers, its a buggy feature and will be removed,
3607         * (pic16_popGet): set register instance field in AOP_CRY,
3608         * (pic16_outBitC): fixed for results in size greater than 1,
3609         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3610         * (pic16_storeForReturn): optimized return of 0,
3611         * (genCmp): experimental code for new genCmp which uses PIC18's
3612         special compare&skip instructions. Initial tests fail some times
3613         with variables grater than 1 byte in size, so new code is disabled,
3614         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3615         a single bit,
3616         * (genCast): began a fix to optimize the casting of a bit to another
3617         bit, now assigning a bitfield to another bitfield will fail, sorry,
3618         * src/pic16/main.c: disabled the use of lr-support feature,
3619         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3620         * added some function prototypes, added function _debugf prototype,
3621         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3622         bits with offset (case PO_GPR_BIT),
3623         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3624         command line,
3625         * (isBankInstruction): modified to return 0 for no banking instruction,
3626         and 1 for banking instruction,
3627         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3628         caused stop processing pCodes after a inline assembly block,
3629         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3630         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3631         registers when it shouldn't,
3632         * src/pic16/ralloc.c (allocReg): add preliminary support for
3633         supporting a limited set of temporary registers,
3634
3635 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3636
3637         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3638           genDataPointerSet): ensure assignments always copy in MSB to LSB
3639           order,
3640           (loadRegFromAop): recognize CLRH optimization,
3641           (genFunction): optimize RECEIVE iCodes in reentrant functions
3642
3643 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3644
3645         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3646           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3647           selected.
3648         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3649         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3650           contiguous with data
3651
3652 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3653
3654         * device/lib/_gptrget.c (_gptrget),
3655         * device/lib/_gptrgetc.c (_gptrgetc),
3656         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3657           instead of sjmp to ret
3658         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3659           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3660
3661 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3662
3663         * .version: bumped version to 2.4.7
3664         * device/lib/_gptrget.c (_gptrget): is now _naked
3665         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3666         * device/lib/_gptrput.c (_gptrput): is now _naked
3667         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3668           (createFunction): fixed xstack
3669         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3670         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3671           or bit either,
3672           (geniCodeCritical): store original interrupt state in an iTemp bit
3673           var unless stack-auto
3674         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3675         * src/SDCCmain.c (setIncludePath): added include/target to search path
3676         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3677         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3678           prototype,
3679           (processFuncArgs): put bit vars in bit area
3680         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3681           unsaveRBank): fixed xstack,
3682           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3683           (genFunction, genEndFunction): fixed xstack,
3684           (genAssign): optimization don't walk backwards through mem
3685         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3686         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3687         * support/regression/Makefile: also make library (for stack-auto) when
3688           making "all" and added "test-mcs51-xstack-auto"
3689         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3690         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3691         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3692         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3693         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3694           make-library by MAKE_LIBRARY
3695         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3696           regression tests for xstack
3697         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3698         * support/regression/tests/critical.c: test for critical on mcs51
3699
3700 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3701
3702         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3703           built version of sdcc instead of installed version
3704
3705 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3706
3707         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3708         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3709           vprintf.c now
3710         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3711         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3712           WARNING: remove device/lib/build/z80/printf.o by hand when
3713           updating from previous build!
3714         * device/lib/z80/printf.c: updated comment
3715         * support/regression/tests/bug1057979.c: test all ports now
3716         * support/regression/tests/bug1065458.c: file added
3717
3718 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3719
3720         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3721           *_start and *_end symbols for static functions
3722
3723 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3724
3725         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3726           and search crt0.o in all library paths,
3727           (setIncludePath): proper handling of --nostdinc,
3728           (setLibPath): proper handling of --nostdlib
3729         * support/regression/Makefile,
3730         * support/regression/ports/ds390/spec.mk,
3731         * support/regression/ports/gbz80/spec.mk,
3732         * support/regression/ports/hc08/spec.mk,
3733         * support/regression/ports/mcs51/spec.mk,
3734         * support/regression/ports/mcs51-large/spec.mk,
3735         * support/regression/ports/mcs51-stack-auto/spec.mk,
3736         * support/regression/ports/z80/spec.mk: use include and lib files from
3737           built version of sdcc instead of installed version
3738         * doc/sdccman.lyx: fixed typo in --nostdinc
3739
3740 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3741
3742         * src/pic/pcode.c,
3743         * src/pic/device.c,
3744         * src/pic/ralloc.c,
3745         * src/pic/gen.c : added support to generate code for struct bit fields.
3746
3747 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3748
3749         * as/xa51/xa_version.h,
3750         * device/include/errno.h,
3751         * device/include/regc515c.h,
3752         * device/lib/_itoa.c,
3753         * device/lib/_ltoa.c,
3754         * device/lib/ser_ir_cts_rts.c,
3755         * sim/ucsim/xa.src/glob.cc,
3756         * sim/ucsim/xa.src/inst_gen.cc,
3757         * sim/ucsim/xa.src/xa_bit.cc,
3758         * sim/ucsim/xa.src/xa_sfr.cc,
3759         * sim/ucsim/z80.src/inst_dd.cc,
3760         * sim/ucsim/z80.src/inst_fdcb.cc,
3761         * support/scripts/keil2sdcc.pl,
3762         * src/pic16/pic16.dsp,
3763         * src/pic16/pic16a.dsp: corrected cvs line endings
3764         * device/lib/printf_large.c: fixed bug 1057979
3765         * src/pic16/gen.c: fixed non-C standard code
3766         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3767         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3768         * support/regression/ports/mcs51/support.c: reload T1 asap
3769         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3770           pdata use and clear idata startup behaviour
3771         * support/regression/tests/bug1057979.c: added
3772
3773 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3774
3775         * device/examples/ds390/ow390/ad26.h,
3776         * device/examples/ds390/ow390/cnt1d.h,
3777         * device/examples/ds390/ow390/crcutil.c,
3778         * device/examples/ds390/ow390/ownet.h,
3779         * device/examples/ds390/ow390/owsesu.c,
3780         * device/examples/ds390/ow390/swt12.h,
3781         * device/examples/ds390/ow390/swtoper.c,
3782         * device/examples/ds390/ow390/temp10.h,
3783         * device/examples/ds390/ow390/thermodl.c,
3784         * device/examples/ds390/tinitalk/tinitalk.dsp,
3785         * device/examples/ds390/tinitalk/tinitalk.dsw,
3786         * device/examples/mcs51/clock/hw.h,
3787         * device/examples/mcs51/simple2/go.bat,
3788         * device/examples/serialcomm/windows/serial.h,
3789         * device/examples/xa51/dummy.c,
3790         * device/examples/xa51/hello.c,
3791         * device/include/80c51xa.h,
3792         * device/include/at89x051.h: corrected cvs line endings
3793
3794 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3795
3796         * src/pic16/main.c (options): added command line --gstack, to trace
3797         stack over/under flows,
3798         * added pragma 'wparam' to allow passing first byte of function
3799         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3800         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3801         call to __gstack_test function and sets up the symbol as extern,
3802         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3803         * popaop): added call to pic16_testStackOverflow,
3804         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3805         wparamList list,
3806         * (genCall, genPcall): now all parameters are passed via stack
3807         except in functions that are pass to wparam pragma in which WREG is
3808         used too,
3809         * (genPcall): REENTRANT flag is checked to see if variable prototype
3810         contains reentrant keyword, don't call a non-reentrant function, via
3811         a reentrant function pointer or vice versa, functions are never
3812         passed via WREG,
3813         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3814         D.Winkler,
3815         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3816         SIGSEGV when accessing a NULL register stucture,
3817         * (pic16_printGPointerType): modified to handle UPPER modifier for
3818         function initializers, changed prototype of function to simpler one,
3819         * (pic16_printIvalFuncPtr): check to see if function is already
3820         added in externs list,
3821         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3822         optimized a move from W to SFR with a move to the same register
3823         later after a CALL,
3824         * device/lib/pic16/debug: NEW directory, contains debug features
3825         which are enabled when linking with libdebug.lib, currently command
3826         line option --gstack enables stack pointer tracing for over/under
3827         flow, corresponding sources are in debug/gstack
3828
3829 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3830
3831         * doc/sdccman.lyx: updated SDCC version,
3832         * (PIC16 port): update list of command line options,
3833         * src/pic16/device.h (structure pic16_options_t): added field gstack
3834         to enable stack overflow tracing on push/pops,
3835         * src/pic16/device.c (statistics structure): added statistics
3836         structure,
3837         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3838         pic16_dump_int_registers): increase statistics counters for each
3839         * variable which is encountered
3840         * (pic16_dump_usection): emit each .udata variable to its own udata
3841         section,
3842         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3843         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3844         parameters via stack, otherwise use old scheme,
3845         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3846         assembler output file,
3847         * src/pic16/main.c: added command line options --gstack to enable
3848         push/pop tracing for stack overflow,
3849         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3850         instructions): added size of each instruction,
3851         * (pic16_countInstruction): estimate size of instructions in
3852         the_pFile list, inline assembly blocks are not counted,
3853         * (pic16_FixRegisterBanking): trace previous register usage, when
3854         banksel optimizations is greater than 0, don't emit a redudant
3855         banksel directive,
3856
3857 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3858
3859         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3860         * src/pic16/ralloc.c : applied same fix for pic16.
3861         * src/pic/gen.c : tidied it up a little.
3862
3863 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3864
3865         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3866         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3867
3868 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3869
3870         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3871
3872 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3873
3874         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3875         non-reentrant function __modsint in the interrupt function (thus
3876         corrupting math operations during serial I/O)
3877         * device/lib/ser_ir.c: as above, changed buffersize
3878         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3879         256.c,d for zeroing
3880         * doc/Makefile: added option -t for rsync
3881
3882 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3883
3884         * src/SDCCast.h (struct ast),
3885         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3886
3887 2004-10-20 Borut Razem <borut.razem AT siol.net>
3888
3889         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3890         package
3891
3892 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3893
3894         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3895         makefile targets,
3896         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3897         support functions to replace long sequences of MOVFF's from access
3898         bank registers to stack and vice versa,
3899         * src/pic16/device.h: added new field opt_flags, where optimization
3900         flags can be set to enable certain features,
3901         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3902         * pBlock, (genFunction, genEndFunction): surroung loop for
3903         saving/loading used registers in stack with PC_INFO pCodes,
3904         INF_LREGS. Code in between can then be optimized by pCode optimizer
3905         to support function calls,
3906         * (genDataPointerSet): fixed bug which loaded float fields in
3907         structures with corrupt data,
3908         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3909         in a standard way debug info on stderr. Feature used for developing
3910         and debugging only,
3911         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3912         obsolete chunks of code,
3913         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3914         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3915         * pic16/src/pcode.c (pic16_newpCodeInfo,
3916         * (pic16_newpCodeOpLocalRegs),
3917         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3918         feature,
3919         * (pic16_pCodeConstString): printing of the initial value of a
3920         symbol as a comment is inhibited since parsing was already done by
3921         copyStr and output is corrupt,
3922         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3923
3924 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3925
3926         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3927
3928 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3929
3930         * as/mcs51/lkarea.c: removed old K&R style,
3931           (lnksect): changed check on boundary error,
3932           (lnksect2): changed check on boundary error,
3933           (lnksect2): extend XSTK to end of page if size = 1
3934         * as/mcs51/lkmain.c: removed old K&R style,
3935           (Areas51): create l_IRAM symbol
3936         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3937         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3938           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3939         * device/lib/_mullong.c: added version to be compiled with xstack
3940         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3941         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3942         * device/lib/mcs51/crtxstack.asm: fixed comment
3943         * src/SDCCglue.c: maxInterrupts defaults to 0,
3944           (emitMaps): added pdata,
3945           (createInterruptVect): (re)moved default,
3946           (glue): added pdata,
3947           (glue): moved __start__xstack to XSTK with default size 1
3948         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3949           and options.float_rent when options.stackAuto is set,
3950           (linkEdit): only write XDATA_NAME if provided on command line
3951         * src/SDCCmem.h,
3952         * src/SDCCmem.c: added pdata
3953         * src/port.h: added pdata_name to PORT
3954         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3955           (saveRegisters, unsaveRegisters): removed usage of B,
3956           (genMinus): fixed accumulator clash,
3957           (genJumpTab): added comment, this needs another look
3958         * src/mcs51/gen.c: added check for "B in use" paranoia,
3959           added pushB() and popB()
3960         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3961           chance
3962         * src/avr/main.c,
3963         * src/ds390/main.c,
3964         * src/hc08/main.c,
3965         * src/mcs51/main.c,
3966         * src/pic/main.c,
3967         * src/pic16/main.c,
3968         * src/xa51/main.c,
3969         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3970           added PSEG (PAG,XDATA) or NULL to port specifier
3971         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3972         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3973           (_mcs51_genInitStartup): removed __start__xstack equ,
3974           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3975         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3976         * src/z80/gen.c (_rleAppend): fixed warnings
3977         * support/regression/tests/zeropad.c: added pdata test
3978         * .version: bumped to 2.4.6
3979
3980 2004-10-17 Borut Razem <borut.razem AT siol.net>
3981
3982         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3983         as a part of nightly build
3984
3985 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3986
3987         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3988         WREG holds the first byte function parameters,
3989         * (aopForSym): take special case for symbols which are in FARSPACE
3990         but in CODESPACE too,
3991         * (assignResultValue): modified to take into account _G.useWreg,
3992         * (genCall): don't use wreg for parameter passing when function is
3993         declared as reentrant, too, added optimization INCF to stack
3994         pointer when stack parameter count is 1,
3995         * (genFunction, genEndFunction): refurnished and fixed to not using
3996         wreg for passing parameters when function has varargs or is
3997         reentrant, fixed bug with symbol name compare for generating
3998         functions in absolute address,
3999         * (pic16_storeForReturn): refurnished,
4000         * (genCmp): began writing a new version of the function, not ready
4001         yet, therefore it is disabled,
4002         * (genAssign): do not read code memory when assigning a function to
4003         a pointer function,
4004         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
4005         array of characters, not pointer,
4006         * (pic16initialComments): in debug mode emit an .ident directive for
4007         the assembler,
4008         * (_process_pragma): emit a new warning type (internal to pic16)
4009         when setting stack to default length, emit a similar warning when
4010         placing a function at absolute address and address is not word aligned
4011         * (_pic16_parseOptions): added 'return TRUE' statement,
4012         * (_pic16_linkEdit): if compiling a source, then add the source's
4013         file object, first in the list of objects to link,
4014
4015 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
4016
4017         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
4018         * src/pic/main.c : removed VC warning.
4019         * src/pic/gen.c : changed comment.
4020
4021 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
4022
4023         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
4024         reference to a deprecated symbol _GPTRREG was causing failure to
4025         link. Thanks G. M. Gallant for the info.
4026
4027 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
4028
4029         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
4030         comments for Bugs item #954788.
4031
4032 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
4033
4034         * src/pic16/device.c (pic16_dump_gsection,
4035         * pic16_groupRegistersInSection): handle symbols declared to be in
4036         access bank differently,
4037         * src/pic16/gen.c (struct _G): added field resDirect,
4038         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
4039         send values read from stack directly to result and don't allocate
4040         temporary values,
4041         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
4042         same registers,
4043         * (pic16_sameRegsOfs): NEW,
4044         * (freeAsmop): if _G.resDirect is set then do not mark registers as
4045         free because they were not allocated from temporary pool,
4046         * pic16_popRegFromString): workaround to fix a problem with
4047         allocating variables twice or never,
4048         * (genGenPointerGet): using PRODL instead of FSR0H,
4049         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
4050         instead of FSR0H,
4051         * (genAssign): take advantage of the _G.resDirect flag,
4052         * (genCast): around line 11844, use mov2f instead of directly
4053         MOVFF'ing between operands to account for literal values,
4054         * src/pic16/genutils.c: some new debug functions for gpsim have been
4055         added,
4056         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
4057         float with integer part only,
4058         * src/pic16/main.c (_process_pragma): handle pragma udata access to
4059         place variables in access bank
4060         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
4061         updated sources to reflect recent changes in gen.c
4062
4063 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
4064
4065         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
4066         sources that searched for headers in installation path, now the
4067         device/include/pic16 is used,
4068         * src/pic16/glue.c (pic16glue),
4069         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
4070         .line directives if not in debug mode, this suppresses assembler's
4071         warnings for ignored directives
4072
4073 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
4074
4075         * src/port.h: made reset_regparms prototype void parameter explicit.
4076         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
4077         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
4078         * doc/sdccman.lyx: documented warning disabling and how to use
4079           printf_large to make it print floats.
4080         * device/include/stdbool.h: NEW
4081         * device/lib/_atof.c,
4082         * device/lib/_divuint.c,
4083         * device/lib/_divulong.c,
4084         * device/lib/expf.c,
4085         * device/lib/printf_large.c,
4086         * device/lib/sincosf.c,
4087         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
4088         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
4089           a completely reentrant lib.
4090
4091 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
4092
4093         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
4094         * device/include/pic16/stdio.h: fixed bug with colon
4095
4096 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
4097
4098         * device/include/pic16/stdio.h,
4099         * device/include/pic16/stdlib.h,
4100         * device/include/pic16/math.h: NEW
4101         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
4102         declared as _naked to reduce overhead
4103         * device/lib/Makefile.in (target port-specific-objects-pic16):
4104         changed * to *.* so to ignore the CVS directory,
4105         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4106         stacked variables back in stack,
4107         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4108         corruption
4109
4110 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4111
4112         * .version: bumped version number to 2.4.5
4113         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4114         * support/Util/SDCCerr.c (messages structure): added entry for
4115         W_POSSBUG2
4116
4117         Large cumulative patch for pic16 port and libraries.
4118         * device/include/pic16/sdcc-lib.h,
4119         * device/include/pic16/stdarg.h,
4120         * device/include/asm/pic16/features.h,
4121         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4122         * device/include/pic16/float.h: changes reentrant keyword with
4123         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4124         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4125         updated target build-libraries to include objects from gptr,
4126         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4127         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4128         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4129         all function headings,
4130         * src/SDCCmain.c: added global parameter userIncDirsSet,
4131         * (parseCmdLine): when option -I is encountered add directory to
4132         userIncDirsSet too,
4133         * src/version.awk: added space between control and long,
4134         * src/pic16/NOTES: added some notes for the port,
4135         * src/pic16/gen.c: added prototype for mov2fp function,
4136         * (fReturnpic16[]): properly named return value registers,
4137         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4138         * (aopForSym): added code to handle symbols with onStack flag set,
4139         symbols onStack are allocated PTRSIZE bytes,
4140         * (aopFreeAsmop): handles special case where asmops are stack objects,
4141         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4142         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4143         added argument lock to trace flaws in allocating temporary registers
4144         when developing port,
4145         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4146         * (pic16_popRegFromString): reenabled allocating a direct register
4147         from string,
4148         * (assignResultValue): various beautifications,
4149         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4150         referenced function argument,
4151         * (genIpush): reenabled to allow stacked arguments, handles only
4152         ic->parmPush iCodes,
4153         * (genCall, genPcall): major changes to allow for variable argument
4154         functions, fixed a bug with falsely restoring stack pointer after
4155         returning from call,
4156         * (genFunction): pending code for critical function,
4157         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4158         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4159         * (genNearPointerGet): fixed bug with indirect reading, was always
4160         reading from INDF0
4161         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4162         pointers,
4163         * (genAddrOf): rewrote code to take address of a stacked function parameter
4164         * (genCast): fixed casting to generic pointer type,
4165         * src/pic16/gen.h: added AOP_STA,
4166         * (struct asmop): added field stk,
4167         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4168         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4169         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4170         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4171         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4172         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4173         generic pointers,
4174         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4175         and library paths,
4176         * (pic16_port structure): generic pointer size is set to 3,
4177         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4178         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4179         compiler warning,
4180         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4181         operand is an iTemp,
4182
4183 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4184
4185         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4186         * debugger/mcs51/simi.c: addapt new syntax of s51
4187
4188 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4189
4190         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4191         * src/pic16/pcode.c: commented out some calls to free() in order to
4192         fix bug #989576,
4193
4194 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4195
4196         * src/SDCCicode.h,
4197         * src/SDCCicode.c (isiCodeInFunctionCall),
4198         * src/avr/ralloc.c (selectSpil),
4199         * src/pic/ralloc.c (selectSpil),
4200         * src/pic16/ralloc.c (selectSpil),
4201         * src/ds390/ralloc.c (selectSpil),
4202         * src/hc08/ralloc.c (selectSpil),
4203         * src/xa51/ralloc.c (selectSpil),
4204         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4205         stack in the middle of a function call sequence (fixes bug #1020268)
4206         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4207         costs associated with the minimum switch case.
4208
4209 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4210
4211         * src/SDCC.lex: fixed bug #1030549
4212
4213 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4214
4215         * src/SDCCcse.h (struct cseDef),
4216         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4217         over a function call if the CSE is derived from a symbol whose
4218         address has been taken (fixes bug #1029883)
4219         * support/regression/tests/bug-1029883: a new regression test for
4220         this bug
4221
4222 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4223
4224         * src/hc08/gen.c (emitinline): fixed bug #1029778
4225         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4226         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4227         and starts toward RFE #905167)
4228
4229 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4230
4231         * src/pic16/gen.c (mov2f): New function to move an operand to
4232         another without considering if it is a literal or a register,
4233         * (pic16_sameRegs): don't check if they are both AOP_REG,
4234         * (AccRsh): removed andmask=0 lines,
4235         * (genLeftShift): duplicated to be improved in future versions,
4236         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4237         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4238         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4239         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4240         * (insertBankSwitch): fixed inserting banksel directives algorithm
4241         for instructions that follow a skip instruction, this fixes a report
4242         for broken subtraction code generation,
4243         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4244         iCode is a left op, just in case result and right share the same
4245         registers
4246
4247 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4248
4249         * src/hc08/main.c,
4250         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4251         preservation of HX
4252         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4253         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4254         on 2004-09-12; it was buggy
4255
4256 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4257
4258         * src/SDCCsymt.h: removed RESULT_CHECK
4259         * src/SDCCast.c,
4260         * src/SDCCglue.c,
4261         * src/SDCCval.c,
4262         * src/pic/glue.c,
4263         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4264
4265 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4266
4267         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4268         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4269         configuration values no more rejected by compiler, they are assigned
4270         to configuration registers with a warning message instead,
4271         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4272         the for-loop so last conf register is emitted too,
4273         * (_pic16_initPaths): link library libsdcc.lib by default,
4274         * (_hasNativeMulFor): modified test for multiplication according to
4275         Raphael Neider's remarks. Integer multiplication is also done with
4276         support functions,
4277         * device/include/pic16/pic18fregs.h: corrected type error in while
4278         testing and including 18f6720 header file
4279
4280 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4281
4282         * src/pic16/device.h (pic16_options): removed field use_crt,
4283         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4284         until an optimization to handle single bits is added,
4285         * (pic16_loadFSR0): moved before genUnpackBits,
4286         * (genAnd): some white lines removed,
4287         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4288         leave_reset flags in pic16_options when using crt modules,
4289
4290 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4291
4292         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4293           for bugs 898889 & 979599. Also used some safer print instructions.
4294
4295 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4296
4297         * src/pic16/device.h (pic16_options_t): added field use_crt,
4298         crt_name, no_crt,
4299         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4300         catch a probable future bug,
4301         * src/pic16/gen.c: aopIdx function commented out,
4302         * (genAssign): commented out old code which used aopIdx,
4303         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4304         code, added if conditionals to take into account the --use-crt
4305         command line options,
4306         * src/pic16/main.c (pic16_optionsTable): added new command line
4307         options, --use-crt= and --no-crt,
4308         * (_pic16_linkEdit): now the proper crt object is added in the
4309         linker command line except than when --no-crt is specified,
4310         * src/pic16/pcode.c,
4311         * src/pic16/pcode.h: added some structures and functions for a new
4312         optimization scheme to compansate for instruction overhead between
4313         same iCodes, this scheme is currently under development and is not
4314         working in any way,
4315         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4316         to && operator,
4317         * device/lib/pic16/startup/crt0i.c,
4318         * device/lib/pic16/startup/crt0iz.c: added global char variable
4319         __uflags to force the generation of an idata section
4320
4321 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4322
4323         * doc/Makefile,
4324         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4325         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4326
4327 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4328
4329         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4330         Frieder) and clarified the default code optimization mode
4331
4332 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4333
4334         * src/SDCC.lex (doPragma, process_pragma),
4335         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4336         "opt_code_size", and "opt_code_balanced"
4337         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4338         regrouped options by category, added support for category headers
4339         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4340         and "--opt-code-size"
4341         * doc/sdccman.lyx: documented these new options and pragmas
4342         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4343         preference into account
4344
4345 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4346
4347         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4348           geniCodePreDec): Fixed bug 904237 by generating a warning
4349         * src/SDCCerr.h,
4350         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4351
4352 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4353
4354         * src/pic/device.c : When no max ram set validate full memory range.
4355         * src/pic/pcode.c,
4356         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4357
4358 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4359
4360         * device/lib/_gptrget.c,
4361         * device/lib/_gptrput.c: updated comment
4362         * device/lib/calloc.c,
4363         * device/lib/free.c,
4364         * device/lib/malloc.c,
4365         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4366         * src/SDCCcse.c (cseBBlock),
4367         * src/SDCCicode.c (printOperand, geniCodeArray),
4368         * src/SDCCicode.h (struct operand): fixed bug 868103
4369         * support/regression/tests/bug-868103.c: added
4370         * src/SDCCast.c (searchLitOp),
4371         * src/SDCCcse.h (struct cseDef),
4372         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4373         * src/SDCCicode.h (struct operand),
4374         * src/SDCCsymt.h (struct sym_link),
4375         * src/avr/gen.c (hasInc),
4376         * src/ds390/gen.c (hasInc),
4377         * src/hc08/gen.c (genPlusIncr, hasInc),
4378         * src/mcs51/gen.c (hasInc),
4379         * src/pic16/glue.c (pic16_printIvalChar),
4380         * src/pic16/ralloc.c (regWithIdx),
4381         * src/xa51/gen.c (hasInc) : removed warnings
4382         * src/SDCCast.c (createBlock): added comment ???
4383         * src/hc08/ralloc.c: updated comments
4384
4385 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4386
4387         * doc/sdccman.lyx: updated section on switch statements, added
4388         section about semaphore locking
4389         * doc/Makefile: added option -info for latex2html
4390         * device/lib/_gptrget.c,
4391         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4392
4393 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4394
4395         * src/pic/device.h,
4396         * src/pic/device.c,
4397         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4398          maxram is less than 0x100.
4399
4400 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4401
4402         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4403
4404 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4405
4406         * src/port.h,
4407         * src/mcs51/main.c,
4408         * src/ds390/main.c,
4409         * src/z80/main.c,
4410         * src/hc08/main.c,
4411         * src/pic/main.c,
4412         * src/pic16/main.c,
4413         * src/avr/main.c,
4414         * src/xa51/main.c
4415         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4416         a jump table is the best form for a switch statement, including
4417         automatic insertion of missing cases to make the case range
4418         continuous. Developed in collaboration with Frieder Ferlemann.
4419
4420 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4421
4422         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4423         accumulator result if it needs sign extension
4424
4425 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4426
4427         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4428
4429 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4430
4431         * device/lib/gbz80/printf.c,
4432         * device/lib/z80/printf.c: removed define for NULL
4433
4434 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4435
4436         * as/xa51/xa_link.c,
4437         * device/examples/ds390/ow390/ad26.c,
4438         * device/examples/ds390/ow390/cnt1d.c,
4439         * device/examples/ds390/ow390/counter.c,
4440         * device/examples/ds390/ow390/ds2480.h,
4441         * device/examples/ds390/ow390/ds2480ut.c,
4442         * device/examples/ds390/ow390/findtype.c,
4443         * device/examples/ds390/ow390/gethumd.c,
4444         * device/examples/ds390/ow390/owllu.c,
4445         * device/examples/ds390/ow390/ownetu.c,
4446         * device/examples/ds390/ow390/swt12.c,
4447         * device/examples/ds390/ow390/swtloop.c,
4448         * device/examples/ds390/ow390/temp.c,
4449         * device/examples/ds390/ow390/temp10.c,
4450         * device/examples/ds390/ow390/thermo21.c,
4451         * device/examples/ds390/ow390/tinilnk.c,
4452         * device/examples/ds390/ow390/tstfind.c,
4453         * device/examples/serialcomm/windows/serial.cpp,
4454         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4455         * device/include/reg51.h: fixed line endings for cvs
4456
4457 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4458
4459         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4460         packRegsForAccUse, packRegisters): new accumulator register
4461         packing algorithm
4462         * support/regression/ports/hc08/support.c (_putchar): suppress
4463         warning of unused variable
4464         * src/SDCCicode.c: added SWAP entry to codeTable
4465
4466 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4467
4468         * device/lib/sprintf.c: forgot to add this file before previous commit
4469
4470 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4471
4472         * src/pic16/gen.c (genPackBits): added operand right in function
4473         parameters, load result directly if p_type is POINTER (that is
4474         called by genNearPointerSet)
4475         * (genUnPackBits): added operand left in function parameters,
4476         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4477         FSR0 if accessing bitfields,
4478
4479 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4480
4481         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4482           _print_format; updated printf, sprintf, vsprintf
4483         * device/include/asm/default/features.h: corrected comment/define
4484         * device/lib/Makefile.in: added sprintf.c
4485         * device/lib/libsdcc.lib: added sprintf module
4486         * device/lib/printf_large.c,
4487         * device/lib/vprintf.c,
4488         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4489           into these 3 files
4490         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4491         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4492         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4493           hc08 test
4494         * support/regression/tests/zeropad.c: define idata as data for hc08
4495
4496 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4497
4498         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4499         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4500         labels are referenced at least once (even if a reference is not found)
4501         * src/hc08/gen.c (emitcode): set isComment flag for comments
4502         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4503         loads), rules 6a..6b (optimize jumps to return)
4504
4505 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4506
4507         * device/lib/acosf.c (acosf),
4508         * device/lib/asinf.c (asinf),
4509         * device/lib/atanf.c (atanf),
4510         * device/lib/ceilf.c (ceilf),
4511         * device/lib/cosf.c (cosf),
4512         * device/lib/coshf.c (coshf),
4513         * device/lib/cotf.c (cotf),
4514         * device/lib/fabsf.c (fabsf),
4515         * device/lib/floorf.c (floorf),
4516         * device/lib/log10f.c (log10f),
4517         * device/lib/logf.c (logf),
4518         * device/lib/sinf.c (sinf),
4519         * device/lib/sinhf.c (sinhf),
4520         * device/lib/sqrtf.c (sqrtf),
4521         * device/lib/tanf.c (tanf),
4522         * device/lib/tanhf.c (tanhf),
4523         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4524         replaced all instances of "reentrant" in the library functions
4525         defined in math.h with this macro.
4526         * support/regression/tests/float_trans.c: reenabled test for hc08
4527
4528 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4529
4530         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4531         erroneously deleted
4532
4533 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4534
4535         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4536         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4537         multi-byte volatile operands are used
4538         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4539         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4540         initialization to area GSINIT0 so that it would always precede
4541         any static initializers in GSINIT
4542         * support/regression/tests/zeropad.c: fixed idata define for hc08
4543         * support/regression/tests/bug-927659.c,
4544         * support/regression/tests/float_trans.c: disabled tests for hc08
4545         pending missing library routines
4546         * .version: increased version number to 2.4.4 - hc08 port now passes
4547         regression tests
4548
4549
4550 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4551
4552         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4553         * Makefile.common.in,
4554         * as/Makefile,
4555         * as/hc08/Makefile.in,
4556         * as/mcs51/Makefile.in,
4557         * as/z80/Makefile.in,
4558         * debugger/mcs51/Makefile.in,
4559         * device/include/Makefile.in,
4560         * device/lib/Makefile.in,
4561         * doc/Makefile,
4562         * link/Makefile,
4563         * link/z80/Makefile.in,
4564         * packihx/Makefile.in,
4565         * sim/ucsim/main_in.mk,
4566         * sim/ucsim/avr.src/Makefile.in,
4567         * sim/ucsim/doc/Makefile.in,
4568         * sim/ucsim/gui.src/serio.src/Makefile.in,
4569         * sim/ucsim/hc08.src/Makefile.in,
4570         * sim/ucsim/s51.src/Makefile.in,
4571         * sim/ucsim/xa.src/Makefile.in,
4572         * sim/ucsim/z80.src/Makefile.in,
4573         * src/Makefile.in,
4574         * support/cpp2/Makefile.in,
4575         * support/librarian/Makefile,
4576         * support/makebin/Makefile: added DESTDIR to the install path proposed
4577         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4578         * doc/sdccman.lyx: added DESTDIR documentation
4579
4580 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4581
4582         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4583         instruction for interrupt handlers, use fast returns when returning
4584         from high priority interrupts
4585
4586 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4587
4588         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4589         code generation
4590         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4591         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4592         bugs, ported much of Bernhard's code from mcs51
4593         * src/mcs51/gen.c (genSend),
4594         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4595         than one when calling a reentrant function
4596         * device/lib/_mullong.c: defined an alternate struct layout for big
4597         endian ports (hc08)
4598
4599 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4600
4601         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4602         test
4603
4604 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4605
4606         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4607         are sane and complete before asking the port its prefered parameter
4608         passing method (fixes bug #1017633)
4609         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4610         and _ret3
4611
4612 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4613
4614         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4615         problem in bitfields >= 8 bits.
4616
4617 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4618
4619         * src/SDCCsymt.c: undid changes that were not meant to be committed
4620
4621 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4622
4623         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4624
4625 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4626
4627         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4628           copied and wrong bit got inverted
4629
4630 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4631
4632         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4633         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4634         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4635         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4636         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4637         assignments to bitfields at known addresses
4638         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4639         reads from bitfields at known addresses
4640         * src/hc08/ralloc.c (packRegisters),
4641         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4642         genhc08Code): optimize pointer get values used as conditionals
4643         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4644         and branch
4645
4646 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4647
4648         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4649         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4650         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4651         as conditionals
4652
4653 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4654
4655         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4656
4657 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4658
4659         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4660         related problems
4661
4662 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4663
4664         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4665
4666 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4667
4668         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4669         mcs51 port
4670
4671 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4672
4673         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4674
4675 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4676
4677         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4678         cases use more compact code.
4679
4680 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4681
4682         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4683
4684 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4685
4686         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4687
4688 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4689
4690         * src/SDCCsymt.h,
4691         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4692         parameter of changePointer() from symbol* to sym_link*
4693         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4694         * src/SDCCsymt.c (compareType): void* type is castable to other
4695         pointers, but not necesarily an exact match.
4696         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4697         is no longer blindly treated as an exact match.
4698         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4699
4700 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4701
4702         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4703
4704 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4705
4706         * src/pic/gen.c,
4707         * src/pic/pcode.c,
4708         * src/pic/ralloc.h,
4709         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4710
4711 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4712
4713         * src/pic/device.c,
4714         * src/pic/device.h,
4715         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4716
4717 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4718
4719         * src/mcs51/gen.c (emitcode): fixed bug #992819
4720
4721 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4722
4723         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4724           there's no need to make it worse
4725
4726 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4727
4728         * src/mcs51/ralloc.c (deassignLR),
4729         * src/ds390/ralloc.c (deassignLR),
4730         * src/hc08/ralloc.c (deassignLR),
4731         * src/z80/ralloc.c (deassignLR),
4732         * src/pic/ralloc.c (deassignLR),
4733         * src/pic16/ralloc.c (deassignLR),
4734         * src/avr/ralloc.c (deassignLR),
4735         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4736         rlivePoint): fixed another part of bug #971834
4737
4738 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4739
4740         * src/z80/main.c: enabled "critical" keyword
4741         * src/z80/mappings.i,
4742         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4743         functions (fixes bug #979646)
4744         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4745
4746 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4747
4748         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4749           such as c:\mydir.
4750
4751 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4752
4753         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4754           doesn't disable too much optimizations
4755
4756 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4757
4758         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4759
4760 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4761
4762         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4763
4764 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4765
4766         * src/pic/gen.c tidied up tabs
4767         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4768         * src/pic/main.c tidied up tabs
4769         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4770         * src/pic/pcoderegs.c tidied up tabs
4771         * src/pic/ralloc.c tidied up tabs
4772
4773 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4774
4775         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4776         to S_FIXED for pic16 port and when symbol is not in level 0,
4777         allocate for S_REGISTER storage class and pic16 port, too,
4778         * src/pic16/device.h: prototype for checkSym,
4779         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4780         * (pic16_assignConfigWordValue): test the value and the mask to
4781         validate that the value is suitable for the configuration word,
4782         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4783         collect extern declared symbols, don't emit symbol twice, check
4784         first if symbol is in publics set first,
4785         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4786         * added command line '--fstack' which enables an experimental
4787         feature for stack access, too buggy to be used yet...
4788         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4789         * (pic16_allocDirReg): when register has storage class S_REGISTER
4790         allocate in pic16_dynAccessRegs,
4791         * device/include/pic16/pic18f????.h: modified configuration word
4792         naming convention, words started as CONFIG0H but should be CONFIG1H
4793
4794 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4795
4796         * device/include/mcs51reg.h: fixed bug 970993
4797
4798 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4799
4800         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4801         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4802         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4803         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4804         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4805         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4806           error/warning numbers,
4807           added function setWarningDisabled()
4808         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4809         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4810           _memcmp.c _memmove.c calloc.c realloc.c free.c
4811         * support/regression/tests/malloc.c: added tests for new functionality
4812         * support/regression/tests/zeropad.c: added tests for truncated initializers
4813           and initialized char arrays starting with '\x0'
4814         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4815
4816 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4817
4818         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4819
4820 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4821
4822         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4823         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4824         peephole 177.e. Thanks to anonymous
4825
4826 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4827
4828         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4829         function isn't used in the source but referenced as a
4830         variable initializer then declare it as extern in .asm file
4831
4832 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4833
4834         * .version: increased version number to 2.4.3
4835
4836         Adding version extension according to ChangeLog CVS revision
4837         * src/Makefile.in (target all): added dependency 'version.h'
4838         * (rule version.h): added rule to create version.h from ChangeLog,
4839         * (rule dep): added dependency version.h,
4840         * src/version.awk: AWK script to create version.h
4841         * src/SDCCdwarf2.c (dwWriteModule),
4842         * src/SDCCglue.c (initialComments),
4843         * src/SDCCmain.c (printVersionInfo): modified to write after
4844         version string the version extension number,
4845         * src/SDCCutil.c: included "version.h"
4846         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4847         number,
4848         * src/SDCCutil.h: added prototype for getBuildNumber
4849
4850         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4851         includeDirsSet, too,
4852         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4853         const char [] is found in function prototype...
4854
4855         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4856         moving to WREG with source is already in WREG,
4857         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4858         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4859         * (aopForSym): stack'ed symbols are partially supported, added
4860         if-clause to support symbols in FARSPACE,
4861         * (sameRegs): added test for AOP_ACC to see if registers are same,
4862         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4863         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4864         * (pic16_popRegFromString): will not allocate a new register if it
4865         doesn't find one by name, bug may have introduced...
4866         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4867         * (genIpush): revived to use pic16 port's stack,
4868         * (genAddrOf): added incomplete case for stack'ed operand,
4869         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4870         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4871         can handle multibyte operands,
4872         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4873         * (pic16initialComments): added message for MPLAB compatibility
4874         mode enabled,
4875         * src/pic16/main.h: prototype for pic16_mplab_comp,
4876         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4877         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4878         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4879         because of increased complexity of procedure,
4880         * (_process_pragma): stack pragma changed to format 'stack pos len',
4881         emit symbol '_stack_end' to conform with gplink,
4882         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4883         to search for register,
4884         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4885         PO_GPR_REGISTER,
4886         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4887         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4888         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4889         case for PO_GPR_REGISTER,
4890         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4891         dies, the new era is ahead !...
4892         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4893         pic16_dynInternalRegs,
4894         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4895         * (pic16_allocDirReg): minor optimizations and bug fixes,
4896         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4897
4898         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4899         load stack and frame pointer with address of 'stack_end' symbol
4900
4901 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4902
4903         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4904         without source code but only variable initializers
4905
4906 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4907
4908         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4909         external are not declared as extern to reduce overhead while linking
4910
4911 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4912
4913         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4914
4915 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4916
4917         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4918           Yee Keat for the patch
4919         * src/SDCCast.c (decorateType): fixed bug #979599
4920         * src/ds390/gen.h: removed local fReturnSizeDS390
4921         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4922         * src/ds390/gen.c (genAnd, genOr, genXor),
4923         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4924
4925 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4926
4927         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4928         add relFilesSet to $3, manipulate $2 to handle linking of object
4929         files without source files in command line,
4930         * device/include/pic16 (all headers): added ID location macros,
4931         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4932         entries for ID location bytes,
4933         * (pic16_assignIdByteValue): NEW,
4934         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4935         added field dumpcalltree to pic16_options_t,
4936         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4937         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4938         emitting rFalseIfx label after check_carry label,
4939         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4940         pic16_emitDIRegs), NEW
4941         * (pic16glue): dump .calltree file when option --calltree found,
4942         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4943         * (_pic16_genAssemblerPreamble): emit ID locations after
4944         configuration registers,
4945         * (pic16_linkCmd): modifications of the link command,
4946         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4947         * (pic16_pCodeInitRegisters): don't init stack registers,
4948         * (pic16_findPrevInstruction): fixed bug,
4949         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4950         bug with immediate registers,
4951         * (buildCallTree): traces stack push and pop,
4952         * (pct2): dump also stack usage for each function,
4953         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4954         * (pic16_allocDirReg): various modifications,
4955         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4956         fixed to 1,
4957
4958 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4959
4960         * src/pic16/pcode.c: removed buggy double colon
4961
4962 2004-07-01 Borut Razem <borut.razem AT siol.net>
4963
4964         * support/scripts/sdcc.nsi: added include/pic16 to setup
4965
4966 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4967
4968         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4969         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4970         target 'clean',
4971         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4972         specific command line arguments. Also added sample lkr script
4973         for placing a variable at a specific memory bank.
4974         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4975         at a specific memory bank,
4976         * (pic16_dump_isection): fixed bug which caused string literals to
4977         be omitted when dumping idata section,
4978         * (pic16_groupRegistersInSection): added code to handle registers
4979         in specific memory banks,
4980         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4981         public, all references are renamed too,
4982         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4983         AOP_DPTR2,
4984         * (pic16_storeForReturn): added case to handle when dest is WREG,
4985         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4986         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4987         pic16_rel_udata, check to see if that register is marked as being
4988         a member of a specific memory bank,
4989         * (pic16_printIvalCharPtr): added code to add string literals either
4990         to code or the idata sections,
4991         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4992         also accept the 'udata' pragma,
4993         * src/pic16/main.h: new structure types sectName and sectSym
4994         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4995         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4996         * (pic16_findPrevInstruction): fixed, it returned nothing,
4997         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4998         instruction combinations,
4999         * (pic16_FixRegisterBanking): heavily reorganised,
5000         * (pic16_AnalyzeBanking): if generating banksel directives is
5001         disabled, then don't call FixRegisterBanking at all,
5002         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
5003         completely removed,
5004         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
5005
5006 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
5007
5008         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
5009         Phuah Yee Keat <yk.phuah AT nestac.com>
5010
5011 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5012
5013         * src/pic16/glue.c (pic16createInterruptVect): function now emits
5014         correctly the IVT even if it is relocated to some other location
5015
5016 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
5017
5018         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
5019         * device/include/pic16/pic18f2220.h: NEW,
5020         * device/lib/pic16/libdev/pic18f2220.c: NEW,
5021         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
5022         * src/pic16/device.c (struct Pics16): added info for 18f2220,
5023         * src/pic16/device.h (struct pic16_options): added ivt_loc and
5024         nodefaultlibs, ivt_loc is the location of the interrupt vector
5025         table, and nodefaultlibs signs that default libraries should not be
5026         linked in link stage,
5027         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
5028         according to --ivt-loc argument,
5029         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
5030         when pragma stack is found,
5031
5032 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5033
5034         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
5035         256 (range check), 257 (do while), 258.a-f (bit banging
5036         f.e. on 3-wire SPI bus)
5037
5038 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5039
5040         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
5041         variables used exclusively within a loop
5042
5043 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
5044
5045         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
5046
5047 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5048
5049         * src/SDCClrange.c (computeClash): fixed bug #971834
5050
5051 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5052
5053         * src/mcs51/gen.c (genCmp): fixed bug #975903
5054         * src/hc08/gen.c (operandsEqu),
5055         * src/ds390/gen.c (operandsEqu),
5056         * src/z80/gen.c (operandsEqu),
5057         * src/pic/gen.c (operandsEqu),
5058         * src/pic16/gen.c (operandsEqu),
5059         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
5060         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
5061
5062 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5063
5064         * src/SDCCcse.c (cseBBlock): fixed bug #966963
5065
5066 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
5067
5068         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
5069         default case in switch statement,
5070         * glue.c (pic16_initPointer): expr is initialised via decoarteType
5071         to eliminate problem with initialisation of pointers, but problem
5072         still exists,
5073         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
5074         * (emitStaticSegment): removed various lines emitting debug info,
5075         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
5076         added processor registers for utilizing EEPROM,
5077         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
5078         configurable and set 8
5079
5080 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
5081
5082         * .version: increased version number to 2.4.2,
5083
5084         Cumulative patch for pic16 port
5085         * src/pic16/device.c: changed scheme to dump initial values for
5086         variables in idata segment, all print_idata* functions were removed,
5087         now the pic16_printIval* will be called,
5088         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
5089         * _pic16_printPointerType, pic16_printPointerType,
5090         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
5091         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
5092         NEW, similar to the respective functions in SDCCglue.c,
5093         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
5094         way, emitting hex bytes,
5095         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
5096
5097 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5098
5099         * src/avr/ralloc.c (serialRegAssign),
5100         * src/xa51/ralloc.c (serialRegAssign),
5101         * src/pic/ralloc.c (serialRegAssign),
5102         * src/pic16/ralloc.c (serialRegAssign),
5103         * src/hc08/ralloc.c (serialRegAssign),
5104         * src/z80/ralloc.c (serialRegAssign),
5105         * src/ds390/ralloc.c (serialRegAssign),
5106         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5107
5108 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5109
5110         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5111         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5112
5113 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5114
5115         Cumulative patch for pic16 port:
5116         * src/pic16/device.h (typedef PIC16_device) modified fields for
5117         defining microcontrollers,
5118         * src/pic16/device.c: added new info for all devices in Pics16 array,
5119         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5120         to be optimised out by the pCode optimiser,
5121         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5122         specially, bug reported by G.M. Gallant,
5123         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5124         as force'd so that cannot be optimised out by pCode optimiser,
5125         * src/pic16/pcode.c,
5126         * src/pic16/pcodepeeph.c,
5127         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5128         they are disabled by default, but can be enabled explicit with
5129         command argument --denable-peeps, for testing,
5130         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5131         --pomit-ivt in COMPILE_FLAGS
5132
5133 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5134
5135         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5136           compilation on MSVC
5137
5138 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5139
5140         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5141
5142 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5143
5144         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5145         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5146
5147 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5148
5149         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5150         would only assign 0x300001 register.
5151
5152 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5153
5154         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5155         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5156
5157 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5158
5159         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5160         for ds80c400
5161         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5162         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5163         added peephole 254 (left shift), 255 (jump table)
5164
5165 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5166
5167         * device/lib/Makefile.in: removed comment line with model-pic16,
5168         * (target port-specific-objects-pic16): the libraries and objects
5169         are copied to the build directory form the device/lib/pic16/bin
5170         directory
5171
5172         Cumulative patch concerning pic16 port:
5173         * library directory has been re-organized,
5174         * added support for PIC18F1220,
5175         * added headers and library sources for chips 18f1220,18f6520,
5176         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5177
5178         * configuration registers setting has changed, now each supported
5179         device has a complete description of the registers it uses,
5180         * all initialisations are moved to idata sections, these section
5181         can be absolute or relocatable,
5182         * fixed initialisation of codespace variables,
5183         * fixed warning about PCLATU and gpsim,
5184         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5185         * (genAssign): use table reads when assigning from variables in codespace,
5186         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5187         char/int variables placed in codespace,
5188         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5189         registers set in .asm file, no need for --pomit-config-words anymore,
5190         * (pic16glue): some 8051 legacy segments are commented out
5191         (to be removed completely),
5192         * added support for alternative assembler and linker with --asm=
5193         and --link= command line arguments,
5194         * peepholes are disabled automatically in the port, no need to
5195         specify on command line,
5196         * port supports natively char/int/long multiplication, but converts
5197         all divisions to support functions,
5198         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5199         to the file set in variable $2,
5200         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5201         strings in ASCII format and not in hex,
5202         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5203         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5204         allocate proper register if iCodes aren't temporary,
5205
5206 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5207
5208         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5209
5210 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5211
5212         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5213         is commented out
5214
5215 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5216
5217         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5218         computed address is reused
5219         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5220         multi-byte bitfields
5221
5222 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5223
5224         * src/z80/gen.c: (genArrayInit): must check for pointers too
5225
5226 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5227
5228         * support/regression/tests/zeropad.c: never meant to commit the
5229           nestedstruct test: removed, added check for GCC version
5230
5231 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5232
5233         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5234         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5235         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5236           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5237           bugs 928906 and 954082 half-empty initializers
5238         * src/SDCCsymt.h,
5239         * src/SDCCsymt.c (getAllocSize): added for above fix
5240         * src/z80/gen.c (genArrayInit): fixed bug 741044
5241         * support/regression/tests/zeropad.c: added tests
5242
5243 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5244
5245         * src/pic16/device.c (pic16_dump_section): corrected bug which
5246         caused some symbols of the libraries to be misplaced
5247
5248 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5249
5250         * src/pic16/glue.c,
5251         * src/pic16/ralloc.h,
5252         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5253         to fix conflict with pic port
5254
5255 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5256
5257         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5258         externs configuration variables,
5259         * src/pic16/ralloc.h,
5260         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5261         prototype in header, commented out some debug messages
5262
5263 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5264
5265         * src/pic16/glue.c,
5266         * src/pic16/main.c,
5267         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5268         for gpasm COFF object generation. Thanks to D. Hawkins for
5269         his patch info
5270
5271 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5272
5273         * src/ds390/main.c,
5274         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5275         Brock for spotting this)
5276         * src/ds390/gen.c (genEndFunction),
5277         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5278         interrupt handler and critical. Disable push/pop optimizations when
5279         peephole optimizations disabled.
5280
5281 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5282
5283         Updated pic16 library sources and headers.
5284         * device/lib/pic16/pic18f*/ ,
5285         * device/include/pic16/*.h: modified to handle structured SFR
5286         definitions
5287
5288 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5289
5290         * src/port.h (PORT structure): added hook initPaths, now each
5291         port can declare its own default search paths,
5292         which can been seen with the --print-search-dirs option,
5293         see pic16 port for example,
5294         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5295         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5296         * (doPrintSearchDirs): NEW, replaces in a central manner the
5297         printing of search dirs which was split in set*Paths functions,
5298         * (main): added call to port->initPaths and doPrintSearchDirs,
5299         * src/avr/main.c,
5300         * src/ds390/main.c,
5301         * src/hc08/main.c,
5302         * src/izt/i186.c,
5303         * src/izt/tlcs900h.c,
5304         * src/mcs51/main.c,
5305         * src/pic/main.c,
5306         * src/pic16/main.c: modified port structures to reflect addition of
5307         initPaths hook,
5308
5309         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5310         * (pic16_dump_section): for registers in same address reserve memory once,
5311         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5312         to no_banksel,
5313         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5314         result is greater in size than right or left,
5315         * (pic16_genUMult8X8_8): there are some cases where the result can
5316         be 16 bits size, so handle these,
5317         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5318         * (pic16_outBitC): modified to emit pcodes,
5319         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5320         or not,
5321         * (genDivOneByte): implemented algorithm to divide 8-bits,
5322         * (genCmp): uncommented goto, but issues still exist,
5323         * (genAnd): fixed a bug with variables >8bits,
5324         * (genPackBits): optimization added that uses BCF/BSF to change a
5325         single bit,
5326         * (genAssign): fixed bug when assigning floating point literals,
5327         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5328         __sdcc_gsinit_startup label,
5329         * src/pic16/main.c (_pic16_init): removed search directory
5330         initialisations,
5331         * (_pic16_initPaths): NEW, used to initialise search directories,
5332         * (_hasNativeMulFor): support functions for all except char/int
5333         multiplication, and char division,
5334         * (PIC16_port struct): modified entry for native mul support,
5335         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5336         no_banksel option,
5337         * (buildCallTree): call to register_usage is ifdef'ed out,
5338
5339 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5340
5341         * device/include/string.h: applied Stas Sergeev's patch to make this
5342         header file compatible with the preprocessor -Wundef option
5343         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5344         failure (fixes bug #941458)
5345
5346 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5347
5348         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5349         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5350         that the variable, not the function, should be static
5351         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5352         to be consistent with non-literal case
5353
5354 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5355
5356         * src/SDCCast.c (isConformingBody): fixed bug #949967
5357         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5358         convilong): fixed bug #952086
5359
5360 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5361
5362         * src/SDCCmem.c (allocVariables): fixed bug #955321
5363
5364 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5365
5366         * src/hc08/main.c (_hc08_genAssemblerEnd),
5367         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5368         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5369         completely eliminated the use of a temporary file
5370         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5371         when more than one file linked
5372         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5373
5374 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5375
5376         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5377         which fixes bug #543481
5378         * support/regression/tests/bug-751703.c: fixed comments left from a
5379         cut and paste error
5380         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5381         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5382         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5383         scopes
5384         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5385         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5386         are now changed to underscores in moduleName
5387
5388 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5389
5390         * as/mcs51/lkmem.c: better fix for bug #954173
5391
5392 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5393         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5394
5395         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5396         * device/include/c8051f000.h,
5397         * device/include/c8051f120.h,
5398         * device/include/c8051f300.h,
5399         * device/include/c8051f310.h,
5400         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5401         PWM16) and detab'ed
5402
5403 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5404
5405         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5406         and mailing lists, doc'ed --no-peep-comments, removed reference
5407         to knoppix (newest version has no LyX/LaTeX), other minor changes
5408         * src/SDCCglue.c (glue): save 2 bytes stack space with
5409         option --main-return. The ljmp could probably be avoided too
5410
5411 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5412
5413         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5414
5415 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5416
5417         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5418         * src/SDCCopt.c (isLocalWithoutDef),
5419         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5420         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5421         (credit to Maarten Brock for patch #949363, on which this is based)
5422         * support/regression/tests/bug-751703.c: some test cases of extern used
5423         within inner scopes.
5424
5425 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5426
5427         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5428         SPEC_STRUCT
5429         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5430         struct definitions
5431         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5432         dwWriteLabel): fix to create valid debugger symbols even when
5433         the module name has non-alphanumeric symbols in it
5434         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5435         when a variable's allocation has been optimized away
5436
5437
5438 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5439
5440         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5441         * src/hc08/main.c,
5442         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5443         * src/mcs51/main.c,
5444         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5445         * src/ds390/main.c,
5446         * src/z80/gen.c (z80_emitDebuggerSymbol),
5447         * src/z80/main.c,
5448         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5449         * src/pic/main.c,
5450         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5451         * src/pic16/main.c,
5452         * src/avr/gen.c (avr_emitDebuggerSymbol),
5453         * src/avr/main.c,
5454         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5455         * src/xa51/main.c,
5456         * src/SDCCdebug.c (emitDebuggerSymbol),
5457         * src/SDCCdebug.h,
5458         * src/port.h: added a debugger struct to the port struct. Added a
5459         callback for defining debugger symbols
5460
5461         * src/SDCCast.c (createLabel),
5462         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5463         with isitmp = 1
5464         * src/SDCCicode.h,
5465         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5466         iCode back to the ast for the function
5467
5468         * src/hc08/ralloc.c (hc08_assignRegisters),
5469         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5470         unneeded fields from the regs struct.
5471         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5472         pushReg() & pullReg() functions instead of emitcode()
5473
5474         * src/hc08/gen.c (genLabel, genhc08Code),
5475         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5476
5477         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5478         debugger hooks
5479
5480         * src/hc08/gen.c (genEndFunction, genhc08Code),
5481         * src/hc08/gen.h,
5482         * src/mcs51/gen.c (genEndFunction, gen51Code),
5483         * src/mcs51/gen.h,
5484         * src/ds390/gen.c (genEndFunction, gen390Code),
5485         * src/ds390/gen.h,
5486         * src/z80/gen.c (genEndFunction, genZ80Code),
5487         * src/z80/gen.h,
5488         * src/z80/z80.h,
5489         * src/pic/gen.c (genEndFunction, genpic14Code),
5490         * src/pic/gen.h,
5491         * src/pic16/gen.c (genEndFunction, genpic16Code),
5492         * src/pic16/gen.h,
5493         * src/avr/gen.c (genEndFunction, genAVRCode),
5494         * src/avr/gen.h,
5495         * src/xa51/gen.c (genEndFunction, genXA51Code),
5496         * src/xa51/gen.h,
5497         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5498         specific code to cdbFile.c and out of the backend code generators
5499
5500         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5501         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5502         starting address is now 0
5503
5504         * as/hc08/asm.h,
5505         * as/hc08/m08pst.c,
5506         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5507         assembler directive for DWARF support
5508         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5509
5510         * src/src.dsp,
5511         * src/Makefile.in,
5512         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5513
5514 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5515
5516         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5517         and inappropriate peephole optimization in jump tables
5518
5519 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5520
5521         * as/hc08/m08pst.c,
5522         * src/SDCCglue.c: sdccopt works for the hc08 port now
5523
5524 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5525
5526         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5527
5528 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5529
5530         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5531
5532 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5533
5534         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5535         rules
5536         * src/SDCCmain.c,
5537         * src/SDCCglobl.h,
5538         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5539         comments from the peephole optimizer replacement rules
5540         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5541         symbols
5542         * src/SDCCcse.c (updateSpillLocation),
5543         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5544         equivalents
5545         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5546         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5547         objects far pointers
5548
5549 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5550
5551         * src/SDCCsymt.h: a missing part of my last change
5552         * src/pic/ralloc.c (regTypeNum),
5553         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5554
5555 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5556
5557         * src/SDCCicode.h,
5558         * src/SDCCicode.c (aggrToPtrDclType),
5559         * src/SDCCptropt.h,
5560         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5561         ptrPseudoSymConvert),
5562         * src/pic/ralloc.c (regTypeNum),
5563         * src/pic16/ralloc.c (regTypeNum),
5564         * src/hc08/ralloc.c (regTypeNum),
5565         * src/ds390/ralloc.c (regTypeNum),
5566         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5567         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5568
5569 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5570
5571         * link/z80/lkmain.c (afile),
5572         * as/hc08/lkmain.c (afile),
5573         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5574         prevent a pointer problem when a filename has no directory and
5575         no extension specified.
5576
5577 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5578
5579         * link/z80/lkmain.c (afile): allow periods in directory names
5580         * link/z80/lkmain.c (afile),
5581         * as/mcs51/lkmain.c (afile),
5582         * as/hc08/lkmain.c (afile): allow linker script file to have an
5583         extension other than ".lnk"
5584         * link/z80/lklex.c (getfid),
5585         * link/z80/lkmain.c (parse),
5586         * as/mcs51/lklex.c (getfid),
5587         * as/mcs51/lkmain.c (parse),
5588         * as/hc08/lklex.c (getfid),
5589         * as/hc08/lkmain.c (parse): Support comments in the linker script
5590         file on lines by themselves and after filenames
5591
5592 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5593
5594         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5595
5596 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5597
5598         * src/z80/peeph-z80.def: removed some peephole rules that don't
5599         work with multibyte arithmetic (fixed bug #937126)
5600         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5601         to registers and not global variables
5602         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5603         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5604         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5605         checking for assignments not internally generated (fixed bug #931895)
5606         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5607         structure member (fixed bug #930072)
5608
5609 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5610
5611         * src/SDCCmain.c (linkEdit),
5612         * src/hc08/main.c (_hc08_parseOptions),
5613         * as/hc08/Makefile.in,
5614         * as/hc08/aslink.h,
5615         * as/hc08/asm.h,
5616         * as/hc08/m08pst.c,
5617         * as/hc08/lkrloc.c (relr, rele),
5618         * as/hc08/lkarea.c (lnkarea)
5619         * as/hc08/lkmain.c (afile, parse),
5620         * as/hc08/lkelf.c: support for ELF output
5621         * as/hc08/lks19.c (s19),
5622         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5623
5624 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5625
5626         * as/mcs51/lkihx.c: Fixed bug #899105.
5627
5628 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5629
5630         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5631         .dsp files from Unix to DOS.
5632
5633 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5634
5635         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5636         function pointers; we have been compliant for several months now.
5637         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5638         change that was accidently commented out
5639         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5640         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5641         bug #922319
5642
5643 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5644
5645         * src/hc08/gen.c: output of all of the internal debugging information
5646         is now controlled by the D() macro; it is disabled by default
5647
5648 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5649
5650         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5651         harder to keep the same registers during a CAST iCode
5652         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5653         long via int can be done in a single cast, if the signedness is
5654         correct.
5655         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5656         putchar() in tinibios.c in ds390's library
5657
5658 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5659
5660         * src/SDCCast.c (decorateType): fixed bug #898889,
5661         cast result of a literal complement too
5662         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5663         fixed check for bitfields
5664
5665 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5666
5667         * src/SDCCicode.c (geniCodeLogic): made it static,
5668         (geniCodeLogicAndOr): added in order to fix bug #905492,
5669         (ast2iCode): fixed bug #905492
5670         * support/regression/tests/bug-905492.c: added
5671         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5672         (processParms): fixed bug #927659: don't copy parms, this will clear
5673         decorated flag
5674         * support/regression/tests/bug-927659.c: added
5675
5676 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5677
5678         * src/SDCCast.c (addCast): don't cast float to char
5679         * device/lib/libsdcc.lib: added _memmove
5680
5681 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5682
5683         * device/lib/large/Makefile: fixed parallel execution by
5684         replacing `make` by `$(MAKE)`
5685
5686 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5687
5688         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5689         offsets (fixes bug #923936)
5690
5691 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5692
5693         * device/lib/small/Makefile: fixed parallel execution by
5694         replacing `make` by `$(MAKE)`
5695
5696 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5697
5698         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5699
5700 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5701
5702         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5703         * src/regression/Makefile: Regression test was not running.
5704
5705 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5706
5707         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5708         complement if possible
5709         * src/SDCCval.c (valComplement),
5710         * src/SDCCicode.c (operandOperation): fixed complement of literal
5711         * support/regression/tests/onebyte.c (testComplement): added
5712
5713 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5714
5715         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5716         return an optimized tree; actually replace actParm with the new tree
5717         * src/SDCCast.h: added some parantheses to remove side effects
5718         * support/regression/tests/bug-920866.c
5719
5720 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5721         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5722         Bit operands were not being handled properly in the pic14 port.
5723         (now src/regression/add.c passes again).
5724
5725 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5726
5727         * src/SDCC.y (labeled_statement): case and default no longer require
5728         a following statement (RFE #893037)
5729
5730 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5731
5732         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5733         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5734         disabled (fixes bug #916294)
5735         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5736         "mov a,acc"; patch provided by Lenny Story
5737         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5738
5739 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5740
5741         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5742         functions
5743         * src/ds390/gen.c (genFunction, genEndFunction),
5744         * src/ds390/ralloc.c (ds390_assignRegisters),
5745         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5746         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5747         pushed if there are parameters passed on the stack. Also, a cleaner
5748         way to decide if r0/r1 should be pushed/popped. (Together they fix
5749         bug #918693)
5750
5751 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5752
5753         * doc/sdccman.lyx,
5754         * device/lib/mcs51/crtpagesfr.asm,
5755         * device/lib/mcs51/crtxinit.asm,
5756         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5757         to avoid confusion with Si Lab's SFRPAGE register.
5758
5759 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5760
5761         * src/SDCCglue.c (emitMaps): allow public sfr variables
5762         * src/SDCCglue.c (initialComments): include compiler build date
5763         with compiler version and put the timestamp of the generated
5764         assembly file on a serperate line to be less confusing.
5765         * src/port.h: added genInitStartup hook
5766         * src/avr/main.c,
5767         * src/ds390/main.c,
5768         * src/hc08/main.c,
5769         * src/pic/main.c,
5770         * src/pic16/main.c,
5771         * src/xa51/main.c,
5772         * src/z80/main.c: genInitStartup initialize as NULL (default to
5773         historical behaviour)
5774         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5775         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5776         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5777         library instead of hard coding it into the compiler.
5778         * support/regression/ports/mcs51-stack-auto/spec.mk,
5779         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5780         * device/lib/mcs51/Makefile,
5781         * device/lib/small/Makefile,
5782         * device/lib/large/Makefile,
5783         * device/lib/mcs51/crtpagesfr.asm,
5784         * device/lib/mcs51/crtstart.asm,
5785         * device/lib/mcs51/crtxclear.asm,
5786         * device/lib/mcs51/crtxinit.asm,
5787         * device/lib/mcs51/crtclear.asm,
5788         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5789         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5790         and into user configurable files.
5791         * device/lib/clean.mk: clean mcs51 directory too
5792         * support/regression/tests/longlit.c: added static to T1 declaration
5793         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5794         accesses in the initialization code
5795
5796 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5797
5798         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5799         OSCTRIMVAL as noted in bug #916008
5800
5801 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5802
5803         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5804         in loops with multiple exits (reported as incorrect registers
5805         used by Martin Helmling in Sdcc-user list)
5806
5807 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5808
5809         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5810         made ds390 register extensions look less like error messages
5811
5812 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5813
5814         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5815         reported by Adam Wozniak in Sdcc-user list
5816
5817 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5818
5819         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5820         arithmetic optimizations, added debug output
5821
5822 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5823
5824         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5825         * sdcc.spec: updated and split sdcc into 3 rpms
5826         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5827         needed for literals of LEFT_OP and '+'
5828         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5829         introduced RESULT_TYPE_NOPROM
5830         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5831         left shift
5832         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5833         limited promotion to int only for '*'
5834         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5835
5836 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5837
5838         * src/pic16/gen.c (genSkip),
5839         (genc16bit2lit), (gencjneshort): commented out
5840         (is_LitOp): new helper function, checks operand type
5841         (genCmpEq): rewritten
5842
5843 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5844
5845         * support/regression/tests/bug-908454.c: added
5846
5847 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5848
5849         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5850         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5851         (geniCodeCast): cosmetic, don't preserve bit storage class
5852         (geniCodeLeftShift): added promotion
5853         (geniCodeLogic): fixed regression
5854         * src/SDCCsymt.c (computeTypeOr): accept bits too
5855         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5856
5857 2004-03-07  Borut Razem <borut.razem AT siol.net>
5858
5859         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5860
5861 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5862
5863         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5864         version of pic16_genPackRegisters which does not check if ic is a
5865         CAST operator,
5866         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5867         function cause string1.c regression test fails
5868
5869 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5870
5871         * sim/ucsim/configure.in,
5872         * sim/ucsim/configure,
5873         * sim/ucsim/doc/Makefile.in: use docdir
5874         * src/SDCC.y: fixed sbit atrributes
5875         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5876         * src/SDCCast.c (decorateType): |^& need special promotion handling
5877         * src/SDCCast.h,
5878         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5879         * src/SDCCsymt.h (computeType),
5880         * src/SDCCicode.c: computeType() needs op
5881         * src/SDCCsymt.c (checkTypeSanity),
5882         * doc/sddman.lyx: "plain" bitfields are unsigned
5883         * src/SDCCsymt.c (computeTypeOr): added
5884         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5885         |^& ops
5886         * src/SDCCval.c (val*): computeType() needs op
5887         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5888         * support/regression/tests/onebyte.c: added tests for |^&
5889
5890 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5891
5892         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5893         for writing icode into asm output.
5894
5895 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5896
5897         * src/pic16/device.c: added some debug lines enabled
5898         with macro DEBUG_CHECK,
5899         * src/pic16/genarith.c: more debug in genPlus,
5900         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5901         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5902         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5903         * (aopForSym): onStack symbols are re-placed in data memspace,
5904         and onStack flag is cleared,
5905         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5906         copy temporary pcodeop,
5907         * (genPcall): added warning for not updating PCLATU,
5908         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5909         always true for pic16 port,
5910         * (genMultOneWord): NEW, supports integer multiplication,
5911         * (genMult): modified to call genMultOneWord,
5912         * (ifxForOp): added warning when return NULL,
5913         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5914         flag is set before call to operandFromSymbol for implicit
5915         added structures,
5916         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5917         options.intlong_rent are set by default,
5918         * (_hasNativeMulFor): modified to allow port generation of integer
5919         multiplication,
5920         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5921         set regtype to REG_SFR for all registers, restricting seting the
5922         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5923
5924 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5925
5926         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5927         more than 500 times in the regression tests
5928
5929 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5930
5931         * support/Util/SDCCerr.h,
5932         * support/Util/SDCCerr.c,
5933         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5934         enumerator_list),
5935         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5936         for symbol conflicts.
5937         * support/valdiags/tests/enum.c,
5938         * support/valdiags/tests/tentdecl.c,
5939         * support/valdiags/tests/struct.c: expect possible error messages
5940         referring to original symbol definitions.
5941         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5942         * src/SDCCsymt.h,
5943         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5944
5945 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5946
5947         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5948
5949 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5950
5951         * src/pic16/ralloc.c (newReg): fixed bug #908929
5952
5953 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5954
5955         * src/ds390/gen.c: added missing #include "main.h"
5956
5957 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5958
5959         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5960         checking if symbol is already in set,
5961         * src/pic16/device.h: prototype for checkAddSym,
5962         * src/pic16/gen.c: (_G): added entry interruptvector,
5963         * (assignResultValue): removed some commented out lines,
5964         * (genFunction): check for ISR via sym->type, absolute section for
5965         interrupt code is created via a new pBlock, the goto instruction is
5966         placed now correctly at the interrupt vector position, changed all
5967         references from ivec to _G.interruptvector,
5968         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5969         is the interrupt is a high priority one, same for return from ISR,
5970         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5971         externs to calls of checkAddSym,
5972         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5973         pic16_pcode_verbose flag is set,
5974         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5975         * src/pic16/pcoderegs.c: message about how many registers are saved
5976         will only be emitted if pic16_pcode_verbose flag is set,
5977
5978 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5979
5980         * src/ds390/ralloc.h,
5981         * src/ds390/ralloc.c (ds390_regWithIdx),
5982         * src/ds390/gen.c (emitcode),
5983         * src/ds390/main.h,
5984         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5985         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5986         ds390operandCompare, getRegsRead, getRegsWritten,
5987         initializeAsmLineNode): customized instruction size calculation for
5988         ds390, started basis for some register optimizations
5989         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5990         corresponding assembly output
5991         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5992         missing push/pop of r0/r1. Optimized push/pops
5993
5994 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5995
5996         * src/mcs51/main.c (instructionSize): fixed ACALL size
5997         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5998
5999 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
6000
6001         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
6002         the sorting of rlist with NULL elements
6003         * (print_idataType, print_idata): NEW to create idata sections
6004         * src/pic16/device.h: idataSymSet new variable
6005         * src/pic16/gen.c (genFunction): fixed some bugs in string
6006         comparing, improved the absolute section creation for ISRs,
6007         added FSR0L/FSR0H in registers that are saved in an ISR,
6008         * (genInline): fixed the processing of inline snippets,
6009         now they undergo no process by the peephole optimizer
6010         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
6011         are placed in idataSymSet,
6012         * (pic16emitStaticSeg): extern symbols are added in externs,
6013         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
6014         switching when aboslute variables are placed in access bank memory
6015         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
6016         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
6017         commented out with #if,
6018         * (pic16_packRegisters): reintroduce the check for CAST because some
6019         symbols are not correctly handled,
6020         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
6021         pCodeInstruction instead of pCode,
6022         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
6023         pCodeAsmDir definition,
6024         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
6025         directive, then the argument directive is emitted without the leading
6026         tab, hack for inline labels which must be in the first column,
6027         * (compareLabel,pic16_findNextInstruction),
6028         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
6029         * (insertBankSwitch): modified for the new pCodeAsmDir,
6030
6031 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6032         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
6033
6034         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
6035         instance,
6036         * (pushSide): commented out with #if,
6037         * (assignResultValue): fixed some typos in saving
6038         registers,
6039         * (genPcall): FIXED and sync'ed with genCall,
6040         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
6041         * (genNearPointerGet): fixed to handle some more cases,
6042         implementation scheme via table reads,
6043         * (genConstPointerGet): modified to access code memory correct,
6044         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
6045         and improved to handle some cases
6046         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
6047         instead of "RETLW" for init data
6048         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
6049         not IN_DIRSPACE, work around to reduce bank switching when aboslute
6050         variables are placed in access bank memory (<0x80 and >=0xf80),
6051         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
6052         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
6053         TBLWT_POSTDEC,TBLWT_PREINC
6054         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
6055         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
6056         directives
6057         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
6058         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
6059         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
6060         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
6061
6062 2004-02-29  Borut Razem <borut.razem AT siol.net>
6063
6064         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
6065         support/Util/findme.h, support/Util/system.h: enhance binary relative
6066         search for lib and include by using findProgramPath()
6067
6068 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6069
6070         * src/SDCCpeeph.h,
6071         * src/SDCCpeeph.c (pcDistance),
6072         * src/port.h,
6073         * src/mcs51/ralloc.h,
6074         * src/mcs51/ralloc.c (mcs51_regWithIdx),
6075         * src/mcs51/main.h,
6076         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
6077         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
6078         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
6079         size calculation port specific, started basis for some register
6080         optimizations
6081         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
6082         missing push/pop of r0/r1. Optimized push/pops
6083         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
6084         * device/lib/_modsint.c (_modsint),
6085         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
6086         and stack version so regression tests pass
6087
6088 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
6089
6090         * src/Makefile.in (dep): include SLIBOBJS in dependency check
6091         * src/SDCCast.c (decorateType): catch another small optimization
6092         with '?' operator
6093         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
6094         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
6095         modified to finally use computeType() all over SDCC,
6096         see Feature Request #877103
6097         * src/SDCCval.h: cosmetic
6098         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
6099         valCompare(); regression tested in muldiv.c
6100         * support/regression/tests/muldiv.c (testMod): mod sign follows
6101         dividend only
6102
6103 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
6104
6105         * src/SDCCast.c (decorateType): fixed bug #902362
6106         * doc/INSTALL.txt: fixed install instructions for win32
6107
6108 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6109
6110         * device/include/Makefile.in (install): fixed by replacing spaces
6111         by tabs
6112         * doc/README.txt,
6113         * doc/INSTALL.txt: updated for release
6114         * doc/sdccman.lyx: added warning for --xstack being buggy
6115
6116 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6117
6118         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6119         to eliminate build warnings.
6120         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6121
6122 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6123            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6124
6125         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6126         removed -penable-stack, added comment for stack pragma, added
6127         warning for not initializing the stack/frame registers, removed
6128         comment at interrupts section
6129
6130         Stack is made permanent, there is no ability to disable stack usage.
6131         * src/pic16/device.h,
6132         * src/pic16/device.c: removed all references to USE_STACK macro,
6133         * src/pic16/device.c (pic16_dump_section): when no elements in
6134         rlist, free rlist before return,
6135         * (pic16_dump_int_registers): NEW, internal registers are a new set
6136         of general purpose registers reused by each function,
6137         * (checkAddReg): returns 1 if registers is added to set,
6138         * (pic16_groupRegistersInSection): when a registers is of type
6139         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6140         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6141         SRCASECMP macro is moved here from device.c
6142         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6143         PO_PCLATU, PO_PRODL, PO_PRODH,
6144         * (pic16_pCodeOpType, genMinus,
6145         changed compares to "a" register, with AOP_ACC,
6146         * (pic16_genPlus): fixed some bugs and indented properly,
6147         * (pic16_addSign): changed size to size+offset in the MOVWF
6148         instruction,
6149         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6150         multiply 8-bit operand by literal, result is 8-bit,
6151         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6152         multiply 2 8-bit operand, result is 8-bit,
6153         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6154         genUMult8X*_16,
6155         * src/pic16/gen.c: changed accUse to contain WREG only,
6156         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6157         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6158         true, do not use immediate addressing any more unless sym is a
6159         pointer in codespace,
6160         * (aopForRemat): do not use immediate addressing when symbol not in
6161         codespace and when symbol's address is requested,
6162         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6163         accUse size (= 1),
6164         * (aopGet): added case for AOP_ACC and don't return "accumulator
6165         bug" but WREG instead,
6166         * (popGetTempReg): pushes contents of temporary register in stack,
6167         * (popReleaseTempReg): pops contents of temporary register from
6168         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6169         * (pic16_popGet): separated case AOP_ACC to return register WREG
6170         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6171         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6172         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6173         the use of immediate pointers to certain cases only.
6174
6175         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6176         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6177         * (assignResultValue, genCall, genRet): modified to use the new
6178         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6179         genPcall is still broken,
6180         * (genFunction): added code to create 'A' type pBlocks when
6181         interrupt functions are generated, code not extensively tested yet,
6182         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6183         * (genEndFunction): modified so ISRs pop stored registers from stack,
6184         * (genMultOneByte): cleanup,
6185         * (AccRsh): added flag andmask, to and result with appropriate mask,
6186         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6187         * (genDataPointerGet): fixed and reenabled its use,
6188         * (genNearDataPointerGet): bugs fixed,
6189         * (genDataPointerSet): bugs fixed,
6190         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6191         pic16_DumpSymbol, pic16_DumpOp,
6192         * src/pic16/genutils.h: function prototypes for the above functions,
6193         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6194         pointers,
6195         * (pic16emitRegularMap): many many many improvements, but needs a
6196         major cleanup,
6197         * src/pic16/main.c: enable_stack in pic16_options is removed,
6198         * (_pic16_parseOptions): removed command line options -penable-stack,
6199         * (_process_pragma): emit stack symbol only when stack pragma is
6200         processed,
6201         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6202         redirected to FSR0L/FSR0H pair,
6203         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6204         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6205         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6206         for immediates,
6207         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6208         * (dumpPicOptype): NEW,
6209         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6210         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6211         with movff instruction,
6212         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6213         added pic16_int_regs, some packRegsFor* functions are commented out,
6214         because produce errors,
6215         * src/pic16/NOTES: minor modifications
6216
6217 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6218
6219         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6220         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6221         --pack-iram.
6222         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6223         * as/mcs51/lkaomf51.c: fixed bug #895763
6224
6225 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6226
6227         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6228
6229 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6230
6231         * doc/sdccman.lyx: added details about the HC08 storage classes and
6232         interrupts, fixed the register usage info for z80 & gbz80
6233
6234 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6235
6236         * doc/sdccman.lyx: added more pic16 port documentation
6237         * device/include/pic16/: added header pic18fregs.h
6238
6239 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6240
6241         * doc/sdccman.lyx: added Vangelis' contribution
6242
6243 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6244
6245         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6246         extend to the next CALL or PCALL, not just to the next CALL.
6247
6248 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6249
6250         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6251
6252 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6253
6254         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6255         bug #895752 and a better fix for bug #716790
6256
6257 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6258
6259         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6260
6261 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6262
6263         * doc/sdccman.lyx: minor changes, minor changed
6264
6265 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6266
6267         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6268         which can't handle SDCC_NEWONEBYTEOPS,
6269         (geniCodeMultiply): removed conversion from mult to shift for pic14
6270         and pic16
6271
6272 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6273
6274         * src/hc08/gen.h,
6275         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6276         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6277         thus fixing bug #895406
6278
6279 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6280
6281         * device/lib/_modsint.c,
6282         * device/lib/_modslong.c: sign follows divisor only
6283         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6284         signs or signedness can be ignored
6285         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6286         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6287         added optimization for IFX,
6288         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6289         arguments;
6290         reenabled optimization for IFX, which was removed on 2004-01-11
6291         * src/SDCCast.h: added return type IFX
6292         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6293         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6294         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6295         SDCC_OLDONEBYTEOPS selects the old behaviour
6296         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6297         changed again and commented promotion rule
6298         * src/SDCCval.c (valDiv): promotion no longer necessary
6299         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6300         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6301         rewritten
6302         * support/regression/tests/onebyte.c: added
6303
6304 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6305
6306         * gen.c (genInline): reverted to old code for assemnling inline
6307         code because of bug reported James Chadd
6308
6309 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6310
6311         * ralloc.h: missing declarations from previous patch,
6312         seems that patch for ralloc.h was never applied, fixed
6313
6314 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6315            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6316
6317         * pcode.c,
6318         * pcode.h,
6319         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6320         indirect addressing. Marked FSR0 as deprecated
6321         * gen.c (pointerCode): commented out, not needed now
6322         (pic16_popGet2p): new MOVFF helper function
6323         (genGenPointerGet),
6324         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6325         (shiftRLong): removed duplicate debugging info
6326
6327 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6328
6329         * src/ds390/gen.c (genNearPointerGet),
6330         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6331         optimization with bits, but not bitfields.
6332         * src/ds390/ralloc.c (packRegisters),
6333         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6334
6335 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6336
6337         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6338
6339 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6340
6341         * src/SDCCsymt.h,
6342         * src/SDCCicode.c (operandFromSymbol),
6343         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6344         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6345         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6346         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6347         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6348         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6349         bug #892038
6350         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6351         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6352         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6353         * src/SDCCsymt.c (newSymbol),
6354         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6355         enumerator_list),
6356         * src/SDCCval.h,
6357         * src/SDCCval.c (newiList): fixed bug #885705
6358
6359 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6360
6361         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6362         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6363
6364 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6365
6366         * device/include/c8051f120.h,
6367         * device/include/c8051f300.h,
6368         * device/include/c8051f310.h: added/updated header files for Silicon
6369         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6370         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6371         in new section Submitting patches
6372
6373 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6374
6375         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6376         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6377         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6378         genGenPointerSet),
6379         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6380         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6381         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6382         genGenPointerSet),
6383         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6384         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6385         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6386         genGenPointerSet),
6387         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6388         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6389         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6390         genGenPointerSet): fixed bug #892400
6391         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6392         to eliminate build warnings.
6393         * src/SDCCast.c (processParms),
6394         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6395         fixed bug 751859
6396         * support/valdiag/valdiag.py: added GCC to the list of defines active
6397         when compiling with gcc
6398
6399 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6400
6401         * support/Util/SDCCerr.h,
6402         * support/Util/SDCCerr.c,
6403         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6404         with an incomplete type (fixed bug #883734)
6405         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6406
6407 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6408
6409         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6410
6411 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6412
6413         * src/SDCCast.c (decorateType),
6414         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6415         function pointer implementation
6416         * support/regression/tests/funptrs.c: added tests to verify both forms
6417         of function pointers work correctly. Added tests to verify parameters
6418         are passed in the correct order.
6419
6420 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6421
6422         * device.c (regCompare): registers are sorted by ascending
6423         address and increasing size,
6424         * main.c (_pic16_finaliseOptions): removed the declaration
6425         of compiler macro MCU. Now a macro of the format pic18fxxxx
6426         will be defined from the command line
6427
6428 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6429             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6430
6431         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6432         PCOP_RLCF was overwritten!
6433         * gen.c (genSkip): commented out calls to pic16_emitcode,
6434         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6435         * (genlshTwo),
6436         * (genRRC): added debugging info,
6437         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6438         overwritten while shifting,
6439         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6440         overwritten while shifting,
6441         * (AccLsh),
6442         * (AccRsh),
6443         * (shiftLLeftOrResult),
6444         * (shiftRLeftOrResult),
6445         * (shiftRLong),
6446         * (shiftLLong): Implemented with pic16_emitpcode
6447         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6448         * (genLeftShift): Fixed bug, operand for shift by variable always
6449         was "and"ed with 0x0f,
6450         * (genLeftShiftLiteral),
6451         * (genrshTwo),
6452         * (genRightShiftLiteral): added debugging info,
6453         * (genrshFour): added comment,
6454         * (genRightShift): determined signedness from operand "left"
6455         instead of "result"
6456
6457 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6458
6459         * src/SDCCicode.c (geniCodeParms),
6460         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6461         function pointers, fixed function pointer bugs #861242 and #861896
6462
6463 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6464
6465         * device/include/c8051f000.h,
6466         * device/include/c8051f120.h,
6467         * device/include/c8051f300.h: added header files for Silicon
6468         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6469
6470 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6471
6472         * src/SDCCast.c (processParams): added new type flow and restructured
6473         (gatherAutoInit): added new type flow
6474         (addCast): cosmetic changes
6475         (getLeftResultType): added new type flow for array indices, patch
6476         provided by Stas, see FR #877103
6477         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6478         array index patch by Stas
6479         * src/SDCCast.h: added prototype getResultTypeFromType()
6480         * src/SDCCval.h,
6481         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6482         * src/pic/glue.c (pic14emitStaticSeg),
6483         * src/pic16/glue.c (pic16emitStaticSeg),
6484         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6485         for initialization of symbols
6486         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6487         * support/Util/SDCCerr.h:
6488         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6489         * .version: bumped version number to 2.3.8
6490         * device/include/Makefile.in (install),
6491         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6492         avoid warnings
6493
6494 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6495
6496         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6497         Slade Rich fixed an optimization bug
6498         * src/pic/pcodepeep.c,
6499         * src/pic/pcoderegs.c
6500         * doc/Makefile (install): added test for directory
6501
6502 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6503
6504         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6505         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6506         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6507         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6508         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6509         * as/mcs51/asexpr.c (term),
6510         * as/hc08/asexpr.c (term): fixed bug #887146
6511
6512 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6513
6514         * src/z80/gen.c (genMult): handle single byte result product
6515         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6516         DUMMY_READ_VOLATILE (fixed bug #886367)
6517
6518 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6519
6520         * support/regression/tests/libmullong.c: fixed logic, on little endian
6521         hosts we ended without a mullong_wrapper()
6522
6523 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6524
6525         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6526         virus/worm forged address usage.
6527
6528 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6529
6530         Fixed promotion, it should be done on AST level:
6531         * src/SDCCast.c (addCast): added promotion to int
6532         (decorateType): updated call to upCast()
6533         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6534         usualUnaryConversions()
6535
6536 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6537
6538         * support/regression/tests/literalop.c (mulWrapper): Added a
6539         wrapper to remove integer overflow warnings.
6540
6541         * support/regression/tests/float_trans.c: Made work on host.
6542
6543         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6544         location of sz80.
6545
6546         * support/regression/generate-cases.py (main): Changed from inline
6547         to a main method.
6548
6549         * doc/Makefile (install): Changed to depth first to get rid of
6550         missing directory install warning.
6551
6552         * as/Makefile (install-doc): Made work on Mac.
6553
6554 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6555
6556         * src/SDCCast.c: added an additional type flow in decorateType() of
6557         opposite direction, see feature request #860006; it's enabled at runtime
6558         by setting the environment variable SDCC_NEWTYPEFLOW
6559         * src/SDCCast.h: changed prototype of decorateType()
6560         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6561         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6562         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6563         see feature request #877103
6564         * src/SDCCval.c: updated call of decorateType()
6565         (valBitwise): fixed bug #882876
6566         (valMinus): added promotion
6567         (valLogicAndOr): result is unsigned
6568         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6569         * src/SDCCsymt.c (computeType),
6570         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6571         must not cause an unsigned operation
6572         * src/pic/glue (pic14emitRegularMap),
6573         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6574
6575 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6576
6577         * src/pic/pcode.c (PCodeID): commented out left over debug code
6578
6579 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6580
6581         * support/valdiag/tests/overflow.c: added shift tests
6582         * src/pic/device.c,
6583         * src/pic/gen.c,
6584         * src/pic/gen.h,
6585         * src/pic/glue.c,
6586         * src/pic/main.c,
6587         * src/pic/pcode.c,
6588         * src/pic/pcode.h,
6589         * src/pic/pcodepeep.c,
6590         * src/pic/pcoderegs.c,
6591         * src/pic/ralloc.c,
6592         * src/pic/ralloc.h: applied patch from Slade Rich;
6593         added support for multiple code pages and multiple RAM banks on the
6594         PIC 14 port. The ASM files now no longer simply assume all the
6595         code / RAM are in the same page / bank. This means the linker can
6596         safely allocate code/RAM of separate ASM files to different pages/banks.
6597         * doc/sdccman.lyx: added Slade's tips
6598         * src/mcs51/peeph.def: fixed bug #880768
6599
6600 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6601
6602         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6603         * src/SDCCast.c (decorateType): fixed bug #880197
6604
6605 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6606
6607         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6608         getopt.h.
6609
6610         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6611         strtof is not part of C89 and isn't included with Mac OS X.
6612
6613 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6614
6615         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6616         shiftL2Left2Result): fixed bug #879326
6617         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6618         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6619         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6620         address fetch for clr instruction
6621         * device/lib/hc08/_mulint.c: created optimized assembly version
6622         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6623
6624 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6625
6626         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6627         proposed in FR #877103
6628
6629 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6630
6631         * src/SDCCval.c (cheapestVal): added missing checks
6632         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6633         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6634
6635 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6636
6637         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6638         equal operands
6639
6640 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6641
6642         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6643         loaded with the linker search paths (-L arguments) and the libraries
6644         to be linked with the current source (-l arguments). Changes
6645         currently will affect only the pic16 port.
6646         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6647         include path the port specific paths and port specific libraries,
6648         * gplink command now contains the $3 argument,
6649         * src/pic16/device.h,
6650         * src/pic16/device.c,: structure PIC_device is made public and
6651         renamed to PIC16_device, the same for variable Pics which is renamed
6652         to Pics16. Updated all references to them.
6653         * src/pic16/glue.c (pic16glue): corrected bug with code
6654         initialization which bypassed the variable initializations block.
6655
6656         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6657         COMPILE_FLAGS and added the --nostdinc option
6658
6659 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6660
6661         * device/include/mc68hc908jb8.h: Register defs for another member
6662         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6663
6664 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6665
6666         Documenting changes from previous commits.
6667         * configure.in (version 1.56),
6668         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6669         when generating output files to configure the pic16 library,
6670         but now I've commented it out, since gputils aren't installed in the
6671         SF compile farm, so library won't compile
6672
6673         * device/lib/Makefile.in (version 1.56): initially I've added in
6674         target 'all' the prerequestive 'model-pic16' so it compiled the
6675         pic16 library, but now I've commented it out for the same reasons
6676         above,
6677         * added targets 'model-pic16' and 'objects-pic16' to compile the
6678         library
6679         * added target 'port-specific-objects-pic16' to handle the
6680         generated libraries and copy them into the build/ directory
6681         * added target 'clean-intermediate-pic16' to clean intermediate
6682         files into pic16 directory
6683         * in target 'installdirs' added line to create directory pic16 in
6684         the installation path
6685
6686         * device/include/Makefile.in (version 1.11): in target 'install'
6687         added lines to copy all header files to installation path,
6688         * in target 'installdirs' added line create directory for pic16
6689         headers in the installation path
6690
6691 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6692
6693         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6694          a function call
6695
6696 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6697
6698         * configure,
6699         * device/lib/configure.in,
6700         * device/lib/configure: fixed for autoconf 2.57
6701
6702 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6703
6704         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6705         option so that it actually works. Made it specific to the z80, since
6706         the gbz80 doesn't have these kinds of I/O ports.
6707
6708 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6709
6710         * device/include/z180.h,
6711         * device/lib/_memcpy.c,
6712         * device/lib/_memmove.c,
6713         * device/lib/_mulint.c,
6714         * device/lib/ser_ir.c,
6715         * device/lib/ser_ir_cts_rts.c,
6716         * device/lib/_strcmp.c,
6717         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6718         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6719         portmode; added deprecation warning for bank= and protmode= forms.
6720         Also, guard against buffer overflow.
6721         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6722
6723 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6724
6725         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6726         changed interrupt vector table generation to only emit declared vectors.
6727         * device/include/Makefile.in: added missing backslash
6728         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6729
6730 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6731
6732         Mainly changes to support compilation of the device libraries
6733         * src/pic16/device.c: stack is allocated via symbol and not
6734         via literal number. The symbol is placed in the corresponding
6735         position of the data ram
6736         * (pic16_dump_section): relocatable and absolute uninitialized
6737         data are now emitted in sorted order to reduce section naming,
6738         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6739         weren't marked as being in the access bank,
6740
6741 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6742
6743         Added portion of GNU PIC Library under the directory
6744         device/include/pic16 and device/lib/pic16. These files
6745         contain the declarations of SFRs for the PIC18Fxx2 devices.
6746         The directory is initialized via configure from toplevel.
6747
6748 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6749
6750         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6751         the spilllocations to be compared correctly
6752
6753 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6754
6755         * src/SDCCast.c (decorateType): fixed bug introduced today
6756
6757 2004-01-12  Borut Razem <borut.razem AT siol.net>
6758
6759         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6760         doc/sdccman.lyx: upper case pragmas are deprecated
6761
6762 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6763
6764         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6765         in simpler and even better code
6766
6767 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6768
6769         * src/SDCCicode.c (operandOperation): fixed bug #874819
6770         * src/SDCCast.c (decorateType): fixed
6771         char foo (unsigned long ul) { return ul > 0; }
6772
6773 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6774
6775         * doc/sdccman.lyx: Moved and added some sections, small changes
6776         all over. Telling LaTeX to be less strict with word spacing
6777         to better keep the right margin. Changed some notes about
6778         maintainance of the ports in section 3.2.1 - is it OK like this?
6779
6780 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6781
6782         SDCC source changes:
6783         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6784         convilong): modified to inform the pic16 port that builtin functions
6785         are external
6786
6787         PIC16 PORT specific changes:
6788         * src/pic16/device.c pic16_dump_equates() added,
6789         processor registers declared internally by the port are emitted in
6790         the translation as equates,
6791         * src/pic16/gen.c: inline code is passed unprocessed to the
6792         translation,
6793         * (pic16_popGetLit2): fnuction modified to take second operand as
6794         pCodeOp pointer and not as literal,
6795         * (popRegFromIdx): prefixed with pic16_,
6796         * (pic16_popCombine2): modified to receive already allocated pCode
6797         operands,
6798         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6799         * (genFunction): initializes local stack frame and pushes on stack
6800         all the registers used by this function,
6801         * (genEndFunction): restores all registers from stack and restores
6802         stack frame,
6803         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6804         improvements,
6805         * (pic16glue): changed the program startup sequence,
6806         * added new dbName code 'A' for functions placed in absolute section
6807         * src/pic16/main.c: added function attribute _naked,
6808         * added pragma 'code' to place a fnuction at an absolute address,
6809         * added command line arguments --debug-ralloc and --pcode-verbose,
6810         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6811         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6812         * (pic16_newpCodeOpLit2): modified to take the second operand as
6813         pCodeOp pointer,
6814         * (pic16_printpBlock): modified to emit each function in a separate
6815         section,
6816         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6817         UPPER for immediate operands,
6818         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6819         instruction,
6820         * src/pic16/peeph.def: all peepholes with movff are commented out,
6821         because there is a problem in the pcode peep optimizer,
6822         * src/pic16/ralloc.c: the register allocator can now reuse local
6823         function symbols for another function. This saves register usage.
6824         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6825
6826         Added file src/pic16/NOTES with information about program writing on
6827         the current port version.
6828
6829 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6830
6831         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6832         and peephole 252 (array access)
6833
6834 2004-01-09  Borut Razem <borut.razem AT siol.net>
6835
6836         * src/SDCCmain.c : fixed #872250: -l command line defined library
6837           files are scanned before standard library files
6838
6839 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6840
6841         * src/SDCCast.c (decorateType): fixed bug #874046
6842
6843 2004-01-09  Borut Razem <borut.razem AT siol.net>
6844
6845         * support/scripts/sdcc.nsi: remove previous installation
6846
6847 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6848
6849         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6850         bytes for last interrupt vector (mcs51)
6851         * sdcc.spec: fixed typo
6852
6853 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6854
6855         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6856         gen51Code): more efficient parameter receive for --model-large
6857         ("bug" #845294)
6858
6859 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6860
6861         * src/ds390/main.c,
6862         * src/z80/main.c: added missed needLinkerScript flags (more than
6863         one port structure defined in these file)
6864         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6865         bug #795325
6866
6867 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6868
6869         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6870         * src/port.h: added flag needLinkerScript in port->linker
6871         structure to inform whether to create a .lnk file or not,
6872         * src/avr/main.c,
6873         * src/ds390/main.c,
6874         * src/hc08/main.c,
6875         * src/mcs51/main.c,
6876         * src/pic/main.c,
6877         * src/pic16/main.c,
6878         * src/xa51/main.c,
6879         * src/z80/main.c: changed appropriately to configure
6880         needLinkerScript flag
6881         * src/pic/gen.c,
6882         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6883         * src/pic/glue.c: added variable udata_section_name to
6884         override default uninitialized data segment definition for
6885         devices only with SHAREBANK memory (reported from Erik Epetrich)
6886         * (pic14emitOverlay): modified to emit a commented overlay segment
6887         directive when no overlay data exist
6888         * (picglue): modified to emit uninitialized data segment
6889         according to udata_section_name
6890         * src/pic/main.c (_pic14_parseOptions): added command line
6891         options --udata-section-name=[name] to override default
6892         udata definition name
6893         * modified _linkCmd and _asmCmd to include compiler passed
6894         arguments via -W option
6895         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6896         object file from '.rel' to '.o' in port->linker structure,
6897         changed size of fptr from 2 to 3 in port structure
6898
6899 2004-01-07  Borut Razem <borut.razem AT siol.net>
6900
6901         * support/scripts/sdcc.nsi: update PATH
6902         * support/scripts/sdcc.ico: craeted
6903
6904 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6905
6906         * device/include/Makefile.in: fix install
6907         * doc/Makefile: fix install
6908
6909 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6910
6911         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6912         in bug #860505
6913         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6914         how the function variable allocation summary is displayed; also
6915         include information about variables allocated to the overlay
6916         segment
6917
6918 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6919
6920         * as/mcs51/lkmain.c: Help about -Y option
6921         * as/mcs51/lkarea.c: Fixed gcc warnings
6922
6923 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6924
6925         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6926         fixed warning
6927         * support/valdiag/tests/overflow.c: added
6928         * src/SDCCast.c (decorateType),
6929         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6930         LEFT_OP (left shift)
6931
6932 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6933
6934         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6935         (default behaviour).
6936
6937 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6938
6939         A python script to validate compiler diagnostic messages. It can be
6940         used to verify that sdcc complains about bad c source code and
6941         gives a good location of the error.
6942         * support/valdiag/Makefile,
6943         * support/valdiag/valdiag.py,
6944         * support/valdiag/tests/*
6945
6946 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6947
6948         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6949         * src/SDCCsymt.c (newEnumType),
6950         * src/SDCCsymt.h
6951         * support/Util/SDCCerr.c,
6952         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6953         enum related bugs.
6954         * support/regression/tests/enum.c: added test for enum values that
6955         require at least 2 bytes of storage.
6956
6957 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6958
6959         * src/common.h: added ifndef/define/endif macros
6960         around the header file.
6961         Bug reported from Jesus Calvino-Fraga
6962
6963 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6964
6965         * sdcc.spec: updated
6966         * device/include/Makefile.in: don't install CVS directories
6967         * device/lib/Makefile.in: added removal of CVS directories after install
6968         * doc/Makefile: fixed install, added local_icons
6969         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6970         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6971         * src/ds390/gen.c (genRightShift): fixed bug #870788
6972         * src/SDCCast.c (decorateType): fixed bug #870781
6973
6974 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6975
6976         PIC16 port related changes:
6977         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6978         added variable stackPos,
6979
6980         * gen.c: genCall, assignResultValue: added support for
6981         pushing/retrieving function parameters to/from stack,
6982         genFunction,genEndFunction: setup stack frame for the
6983         generated function,
6984         genAddrOf: will be changed according to bug 863624
6985
6986         * added files genutils.c and genutils.h which contain gen*
6987         debugged and optimised functions extracted from gen.c
6988
6989         * glue.c: added variable 'externs' which holds extern symbols,
6990         pic16emitRegularMap: is modified to properly handle relocatable
6991          symbols under the new scheme,
6992         pic16createInterruptVect: is modified
6993         pic16printPublics: is modified to emit 'global' assembler directives,
6994         added pic16_printExterns to print extern symbols,
6995         pic16glue: initializes stack/frame pointer in the beginning of
6996         the assembly output. Temporary hack, will be corrected later,
6997         because gplink yet does not support stack and SDCC does not
6998         yet support a type of crt0.o object to create the final binary.
6999
7000         * Removed many lines that contain 8051 legacy code.
7001         * The code is finally placed under a 'code' directive.
7002         * Added port specific options.
7003
7004         * _process_pragma: simplified since now we do not need *special*
7005         include file to define SFR registers. But a separate header
7006         will be needed. This will be developed later.
7007         * _pic16_parseOptions: added, parses port specific options:
7008         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
7009         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
7010         --preplace-udata-with=
7011
7012         * _pic16_setDefaultOptions: modified to initialize section names,
7013         but hack is temporarly out of order since it needs improvement.
7014         * _pic16_genAssemblerPreamble: configuration words are emitted by
7015         their address instead of their name. This part is incomplete and
7016         supports only the 18Fxx2 devices. Other devices will emit an error
7017         during assembly since they do not contain the same set of config
7018         registers
7019         * _pic16_genIVT: is modified,
7020
7021         * pcode.c: added definitions for some hardware registers that are needed
7022         for stack support
7023         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
7024         All PCI entries are updated. Now LFSR is supported.
7025         * Removed pic16_pciTRIS is mentioned by mdubuc in source
7026         * added pic16_newpCodeOpLit2 to support instructions with
7027         two literal arguments
7028         * pic16_pCode2str: corrected code that emits assembler instructions
7029         with two literal operands and those that have an access bit modifier
7030         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
7031         this fixes a bug which caused some labels to be lost, when an
7032         assembler directive was added, i.e. banksel,
7033         * pic16_FixRegisterBanking: improved logic that causes the insertion
7034         of bank switching,
7035         * InlineFunction: functions that are called once, are not any more
7036         inlined. This can be a port option in the future,
7037
7038         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
7039
7040         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
7041         hold the corresponding uninitialized symbols,
7042         * pic16_allocProcessorRegister: registers have explicit marked the
7043         accessBank field,
7044         * pic16_allocInternalRegister: registers are explicit marked as
7045         not used,
7046         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
7047         processing list, so bit registers were lost,
7048         *
7049
7050         * ralloc.h: added field 'accessBank' and original symbol operand
7051         in register definition,
7052         * removed the field isMapped from register definition,
7053
7054         ** Several functions have been removed from various sources:
7055         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
7056         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
7057         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
7058         pic16_assignRelocatableRegisters
7059
7060         ** others have been introduced:
7061         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
7062         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
7063
7064 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
7065
7066         * support/scripts/inc2h.pl: changed definition of BIT_AT
7067         to emit 'sbit at' instead of 'bit at'. This was a request.
7068
7069         PIC16 port related preliminary changes:
7070         * gen.c: prefixed function popRegFromString with
7071         pic16_ and all references to it corrected
7072         * pcode.c: all pic16_pc_* hardware registers prefixed
7073         with underscore (_),
7074         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
7075         * ralloc.c: newReg(): when register is REG_SFR then
7076         set address to rIdx,
7077         pic16_allocProcessorRegister(): marks register wasUsed=0
7078         pic16_writeUsedRegs(): added a call to assign processor
7079         registers via pic16_assignFixedRegisters
7080
7081 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7082
7083         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
7084         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
7085         variables in unused register banks.  Also the SSEG is placed
7086         wherever there is enough space for it, and IDATA can be anywhere
7087         in internal RAM.  For now compile using -Wl-Y[stack_size].
7088         The mem file is different for this option as well, since it
7089         makes no sense of talking about DSEG lenght.
7090
7091 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
7092
7093         * src/SDCClrange.c: fixed bug 869095 that caused segfault
7094         in certain cases, e.g. when ROM assignment, patch provided
7095         from Albert den Haan.
7096
7097 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
7098
7099         Many signedness and type propagation fixes:
7100         * src/SDCCicode.c: made geniCodeCast() static
7101         replaced SPEC_ by IS_ (cosmetic)
7102         (operandOperation): fixed div and mod operation
7103         (usualBinaryConversions): added support for promotion of char
7104         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
7105         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7106         (geniCodeAdd): an array index will stay unsigned, even if promoted
7107         from char to int
7108         (geniCodeArray): ditto
7109         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7110         * src/SDCCsymt.c (computeType): added more support for char;
7111         promotion of char is selectable by promoteCharToInt, fixed signedness
7112         for all cases
7113         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7114         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7115         * src/SDCCval (val*): replaced signedness calculation by
7116         computeType()
7117         rearranged if-branches (cosmetic)
7118         (valShift): added warning W_SHIFT_CHANGED
7119         (valCompare): fixed problem with different types
7120         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7121         * support/regression/tests/literalop.c: added many cases
7122         * support/regression/tests/ast_constant_folding.c: changed finally to
7123         'unsigned int'
7124         * .version: new year, new version: 2.3.7
7125         * src/SDCCmain.c (main): applied patch #866468
7126         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7127         provided by Scott Bronson
7128         * doc/sdccman.lyx: updated documentation for sdcdb
7129         updated and added chapter tips
7130
7131 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7132
7133         * src/SDCCsymt.h: missing from yesterday's commits
7134
7135 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7136
7137         * src/SDCC.y (struct_or_union_specifier),
7138         * support/Util/SDCCerr.c,
7139         * support/Util/SDCCerr.h: verify that struct & union tags are used
7140         as declared.
7141
7142 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7143
7144         * src/SDCCglobl.h: missing from yesterday's commits
7145
7146 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7147
7148         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7149         sft_attributes, struct_declaration, parameter_declaration,
7150         type_name, start_block, declaration_list),
7151         * src/SDCC.lex (check_type): support redefinition of typedef names
7152
7153 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7154
7155         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7156         aligned xdata arrays. Erik helped me with the if clause.
7157
7158 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7159
7160         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7161         warning
7162
7163 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7164
7165         * src/SDCCast.h,
7166         * src/SDCCast.c (newAst_),
7167         * src/SDCCicode.h,
7168         * src/SDCCicode.c (ast2iCode, newiCode),
7169         * src/SDCCglobl.h,
7170         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7171         expr, statement, expression_statement, selection_statement,
7172         iteration_statement, expr_opt, jump_statement): foundation for tracking
7173         sequence points
7174         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7175         point code too)
7176
7177 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7178
7179         * support/Util/SDCCerr.c,
7180         * src/SDCCast.h,
7181         * src/SDCCast.c (createCase, createDefault, decorateType),
7182         * src/SDCClabel.c (labelUnreach),
7183         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7184         to error messages.
7185         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7186         (with thanks to Stas Sergeev)
7187         * device/include/time.h,
7188         * device/lib/time.c (CheckTime): suppress unreachable code warning
7189
7190 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7191
7192         * src/SDCCast.c (createIvalCharPtr),
7193         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7194         bug #753752)
7195         * support/regression/tests/nullstring.c: tests for these two bugs
7196
7197 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7198
7199         * support/Util/SDCCerr.h,
7200         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7201         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7202         about storage class and 'at' used inside struct or union
7203         * src/SDCCBBlock.c (iCodeFromeBBlock),
7204         * src/SDCCcse.c (ifxOptimize),
7205         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7206         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7207         printIval, emitStaticSeg, emitOverlay),
7208         * src/SDCClabel.c (deleteIfx),
7209         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7210         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7211         gatherAutoInit, processParms),
7212         * support/Util/SDCCerr.h,
7213         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7214         reporting for post-parse errors.
7215
7216 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7217
7218         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7219         implicit casts via union; they don't work on big endian systems
7220         (possible fix for bug #861138)
7221
7222 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7223
7224         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7225         * src/mcs51/main.c: fixed the fix for bug #737001
7226
7227 2003-12-15  Borut Razem <borut.razem AT siol.net>
7228
7229         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7230
7231 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7232
7233         * support/makebin/makebin.c: put output in binary mode
7234
7235 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7236
7237         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7238         xdata and data memory on startup. Set the environment variable
7239         SDCC_NOGENRAMCLEAR to disable this.
7240         * src/mcs51/peephole.def,
7241         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7242         (allows non-interrupt and interrupt code to safely compete for a resource
7243         without the non-interrupt code having to disable interrupts)
7244
7245 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7246
7247         * src/SDCCicode.c (geniCodeAdd),
7248         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7249         with valFromType if type might be a pointer and host is big endian).
7250         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7251         types, not just integer types.
7252         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7253         multiply defined with mismatching "at" address.
7254
7255 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7256
7257         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7258         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7259         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7260         with embedded nulls (fixed bug #753752)
7261
7262 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7263
7264         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7265         Apparently this did not see much testing (endless loop)
7266
7267 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7268
7269         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7270
7271 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7272
7273         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7274         gracefully handle NULL memmap pointers
7275
7276 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7277
7278         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7279         instead of deleting the iCode when an operand is volatile
7280         * src/z80/gen.c (genDummyRead),
7281         * src/mcs51/gen.c (genDummyRead),
7282         * src/ds390/gen.c (genDummyRead),
7283         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7284         not just IC_RIGHT
7285         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7286         * src/SDCC.y: fixed bug #850420
7287
7288 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7289
7290         Applied z80 i/o port patch from Peter Townson and fixed some operators
7291         to better handle operands in A register.
7292         * device/include/z180.h
7293         * src/SDCC.y
7294         * src/SDCCglue.c
7295         * src/z80/gen.c
7296         * src/z80/gen.h
7297         * src/z80/main.c
7298         * src/z80/peeph-z80.def
7299         * src/z80/peeph.def
7300         * src/z80/z80.h
7301
7302 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7303
7304         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7305
7306 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7307
7308         * device/lib/hc08/_mullong.c: Removed extra #endif
7309
7310 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7311
7312         * sim/ucsim/hc08.src/inst.cc,
7313         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7314         carries from x to h
7315         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7316         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7317         * device/include/stdarg.h: fixed varargs for hc08
7318         * device/lib/Makefile.in,
7319         * device/lib/hc08/Makefile,
7320         * device/lib/hc08/_mulint.c,
7321         * device/lib/hc08/_mullong.c: fixed some endian problems
7322
7323 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7324
7325         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7326         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7327         * device/lib/_gptrget.c,
7328         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7329
7330 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7331
7332         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7333         * src/SDCCast.c (astErrors): fixed bug #846007
7334         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7335
7336 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7337
7338         * src/SDCCast.c (decorateType): disabled a transformation I added in
7339         revision 1.188 (access to fields of a structure at an absolute address);
7340         it breaks with bitfields, extern declarations, and gcse analysis.
7341         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7342         could be assigned through a pointer, so don't complain.
7343         * src/SDCCast.c (astErrors),
7344         * src/SDCCast.h,
7345         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7346
7347 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7348
7349         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7350         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7351         output of __config directives, since gpasm now supports them
7352         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7353         pre-processor macro, i.e. -DMCU=p18f452
7354         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7355         and modified to handle 'cast' icode similarly to '=' icode
7356         * src/pic16/device.h (typedef struct PIC_device): added field
7357         'extMIface' to indicate that chip has external memory interface
7358         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7359         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7360         18F8720
7361
7362 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7363
7364         * src/SDCC.y (pointer): fixed bug #846006
7365         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7366         * src/SDCCast.c (decorateType): fixed bug #846009
7367         * src/ds390/peeph.def,
7368         * src/ds390/gen.c (genAnd, genOr),
7369         * src/mcs51/peeph.def,
7370         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7371
7372 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7373
7374         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7375         * src/SDCCdflow.c
7376         * src/SDCCcse.c
7377         * src/SDCCcse.h
7378         * src/SDCCBBlock.h
7379         * src/SDCCBBlock.c
7380
7381 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7382
7383         fixed bug #845089
7384         * src/SDCCbitv.h,
7385         * src/SDCCbitv.c: added function to free a bitvector
7386         * src/SDCClrange.h,
7387         * src/SDCClrange.c: added function to recompute the liveranges
7388         * src/avr/ralloc.c,
7389         * src/ds390/ralloc.c,
7390         * src/hc08/ralloc.c,
7391         * src/mcs51/ralloc.c,
7392         * src/pic/ralloc.c,
7393         * src/pic16/ralloc.c,
7394         * src/xa51/ralloc.c,
7395         * src/z80/ralloc.c: recompute the liveranges after register packing
7396
7397 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7398
7399         * src/SDCCloop.c (newInduction): fixed bug #845630
7400
7401 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7402
7403         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7404         inadvertantly left behind from my 2003-11-12 change
7405
7406 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7407
7408         Updated headers I neglected to commit yesterday.
7409         * src/SDCClrange.h,
7410         * src/SDCCicode.h
7411
7412 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7413
7414         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7415         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7416         * src/SDCCopt.c (eBBlockFromiCode),
7417         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7418         the creation of the key hash table from the sequencing so it can be used
7419         earlier (for some GCSE bug fixes still pending)
7420
7421 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7422
7423         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7424         * support/regression/tests/addsub.c: testing genPlus shortcut
7425
7426 2003-11-15  Borut Razem <borut.razem AT siol.net>
7427
7428         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7429
7430 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7431
7432         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7433         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7434         ordering is immaterial.
7435         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7436
7437 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7438
7439         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7440         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7441         (SIGSEV) of bug #840381
7442         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7443         unlink new file before rename if new and old filenames are the same)
7444
7445 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7446
7447         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7448         uninitialized variables) for the mcs51. Set environment variable
7449         SDCC_GENRAMCLEAR to test.
7450         xdata initialization slightly shorter
7451
7452 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7453
7454         * src/SDCCsymt.h,
7455         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7456         #838241 & 780691 (basicly the same bug)
7457         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7458         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7459
7460 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7461
7462         * src/SDCCmain.c (linkEdit): "fix" #834252
7463
7464 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7465
7466         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7467         * src/SDCCast.h,
7468         * src/SDCC.y: fixed bug #819403
7469
7470 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7471
7472         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7473         the reentrant attribute.
7474         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7475         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7476         simulation
7477         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7478         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7479         erroneously reduced to a literal.
7480         * src/hc08/ralloc.c (packRegisters, rematStr),
7481         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7482         some cases
7483
7484 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7485
7486         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7487         * doc/sdccman.lyx: changed from 'article' to 'book'
7488         * doc/Makefile: readded test_suite_spec and cdbfileformat
7489
7490 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7491
7492         * device/include/stdlib.h: include malloc.h to comply with ANSI
7493         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7494
7495 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7496
7497         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7498         * doc/clean.mk: also remove *.out files
7499         * doc/sdccman.lyx: some additions, larger top/bottom margins
7500
7501 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7502
7503         * src/SDCC.y: fixed bug #837365
7504         * support/regression/tests/bitopcse.c
7505         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7506         a symbol (might be valop instead)
7507         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7508         * device/lib/clean.mk: added hc08 to the cleaning list
7509
7510 2003-11-04  Borut Razem <borut.razem AT siol.net>
7511
7512         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7513           made 2003-11-04
7514         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7515           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7516           malloc is declared in standard stdlib.h
7517
7518 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7519
7520         * device/lib/hc08/Makefile: need to clean .rel not .o files
7521         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7522
7523 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7524
7525         * src/port.h,
7526         * src/hc08/main.c,
7527         * src/mcs51/main.c,
7528         * src/ds390/main.c,
7529         * src/z80/main.c,
7530         * src/avr/main.c,
7531         * src/pic/main.c,
7532         * src/pic16/main.c,
7533         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7534         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7535         tests (which uses the port's oclsExpense function)
7536         * src/SDCC.y,
7537         * src/SDCCast.c,
7538         * src/SDCCicode.c,
7539         * src/hc08/gen.c,
7540         * src/ds390/gen.c,
7541         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7542
7543 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7544
7545         * src/SDCCcse.c (ifxOptimize),
7546         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7547         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7548         deleting the IFX iCode.
7549         * src/hc08/ralloc.c: reduced unneeded slocs
7550         * src/hc08/gen.c: fixed bug in asmopToBoolean
7551
7552 2003-11-04  Borut Razem <borut.razem AT siol.net>
7553
7554         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7555           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7556           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7557           transferred to configure
7558
7559 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7560
7561         Use headers defined in the C[++] standards:
7562         * sim/ucsim/gui.src/serio.src/fileio.cc
7563         * sim/ucsim/gui.src/serio.src/frontend.cc
7564         * sim/ucsim/gui.src/serio.src/main.cc
7565         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7566         * support/Util/NewAlloc.c
7567         * as/hc08/lklibr.c
7568         * as/mcs51/lklibr.c
7569         * as/z80/aslist.c
7570         * as/z80/assym.c
7571
7572 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7573
7574         * Added MSVC projects for hc08 assembler and linker:
7575         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7576         /as/hc08/link_hc08.dsp
7577
7578 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7579
7580         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7581
7582 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7583
7584         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7585
7586 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7587
7588         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7589
7590 2003-10-31  Borut Razem <borut.razem AT siol.net>
7591
7592         * support/cpp2/cpplib.h,
7593           support/cpp2/cpplib.c,
7594           support/cpp2/cpplex.c,
7595           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7596           to switch _asm block preprocessing on / off. Default is
7597           #pragma preproc_asm +
7598
7599 2003-10-31  Borut Razem <borut.razem AT siol.net>
7600
7601         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7602           when outputting comment blocks (when executed with -C option) and
7603           _asm (SDCPP specific) blocks
7604
7605 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7606
7607         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7608
7609 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7610
7611         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7612
7613 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7614
7615         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7616         * src/SDCCast.c (decorateType): fixed bug #832664
7617
7618 2003-10-31  Borut Razem <borut.razem AT siol.net>
7619
7620         * support\cpp2\cpplex.c: fixed for SDCPP:
7621           comments(when executed with -C option) and _asm blocks
7622           were included even if they where in skipped #if block.
7623           Applied solution from GCC cpp 3.3.2
7624
7625 2003-10-31  Borut Razem <borut.razem AT siol.net>
7626
7627         * src/SDCC.lex: sdcc now understands both formats:
7628           '# <line_number> <file_name>' and
7629           '#line <line_number> <file_name>'
7630         * support/cpp2/cppmain.c: sdcpp now generates the standard
7631           '# <line_number> <file_name>' instead of former
7632           '#line <line_number> <file_name>'
7633
7634 2003-10-30  Borut Razem <borut.razem AT siol.net>
7635
7636         * support/cpp2/cpphash.h,
7637         * support/cpp2/cpplib.h
7638         * support/cpp2/cpplex.c,
7639         * support/cpp2/cppmain.c,
7640         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7641
7642 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7643
7644         Fixed a number of problems revealed by bug #827883.
7645         * src/SDCCloop.c (loopInvariants): Spill location of the
7646         result operand should be recomputed if extracted from
7647         a loop. Also, don't extract assignments of an iTemp
7648         from a literal.
7649         * src/SDCCast.c (isConformingBody): loop reversal should
7650         not occur if the control variable is involved with a
7651         relational operator.
7652
7653 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7654
7655         * .version: bumped to 2.3.6 to reflect the big improvements
7656         made by Erik and Klaus. Thanks!
7657
7658 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7659
7660         Replaced the livrange code.
7661         * src/SDCClrange.c: added new LR code
7662         * src/SDCCloop.c,
7663         * src/SDCCBBlock.h: removed remainig parts from old LR code
7664         * src/ds390/ralloc.c,
7665         * src/ds390/gen.c: minor fixes to make it work with new code
7666
7667 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7668
7669         * as/hc08/asm.h,
7670         * as/hc08/lkrloc.c,
7671         * src/hc08/gen.c,
7672         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7673         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7674         (tweaked fix for bug #818696)
7675
7676 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7677
7678         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7679
7680 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7681
7682         * src/SDCCmain.c,
7683         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7684         * src/mcs51/gen.c (gencjneshort),
7685         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7686         more efficient (per Scott Bronson's suggestion)
7687
7688 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7689
7690         Extended the semantics of the critical keyword to include
7691         individual statements. See RFE #827755 and #799831
7692         * src/SDCC.y
7693         * src/SDCCicode.c
7694         * src/SDCCopt.c
7695         * src/SDCCast.c
7696         * support/Util/SDCCerr.c
7697         * support/Util/SDCCerr.h
7698         * src/mcs51/gen.c
7699         * src/ds390/gen.c
7700         * src/hc08/gen.c
7701
7702 2003-10-19  Borut Razem <borut.razem AT siol.net>
7703
7704         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7705
7706 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7707
7708         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7709         Fixed bug #818696
7710         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7711         and predecrement operand is displayed
7712
7713 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7714
7715         * src/SDCCval.c (valMinus): fixed bug #826041
7716
7717 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7718
7719         Some hc08 related updates that I missed earlier
7720         * sim/ucsim/stypes.h
7721         * support/regression/ports/hc08/spec.mk
7722
7723 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7724
7725         New target "hc08" for the Motorola 68hc08 family of micros
7726
7727         * configure
7728         * configure.in
7729         * Makefile
7730         * src/hc08/*
7731         * src/SDCCmain.c
7732         * src/port.h
7733         * sim/ucsim/hc08.src/*
7734         * sim/ucsim/configure.in
7735         * src/ucsim/configure
7736         * sim/ucsim/packages_in.mk
7737         * as/hc08/*
7738         * as/Makefile
7739         * device/include/mc68hc908qy.h
7740         * device/lib/hc08/*
7741         * device/lib/Makefile.in
7742         * support/regression/ports/hc08/*
7743         * support/regression/Makefile
7744
7745 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7746
7747         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7748         regression test
7749         * src/ds390/gen.c (genCast): fixed bug #821957
7750
7751 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7752
7753         * device/lib/logf.c: "fixed" overlay bug
7754         * support/regression/ports/host/spec.mk: added m library
7755         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7756         * support/regression/tests/float_trans: added (for Eric)
7757
7758 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7759
7760         * src/mcs51/gen.c (genCpl): fixed bug
7761         http://sf.net/mailarchive/message.php?msg_id=6263915
7762
7763 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7764
7765         * src/SDCCast.c (decorateType): added extended constant folding
7766         * src/SDCCsymt.c (computeType): cleanup
7767         * src/SDCCval.c (valShift): minor optimization
7768         * support/regression/tests/ast_constant_folding.c: added
7769
7770 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7771
7772         * src/SDCCmain.c: removed some unintended changes
7773
7774 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7775
7776         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7777         * src/z80/gen.c: fixed part of bug #817589
7778         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7779
7780 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7781
7782         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7783         * src/SDCCcflow.c
7784         * src/SDCCcse.c
7785         * src/SDCCdflow.c
7786         * src/SDCClabel.c
7787         * src/SDCClrange.c
7788         * src/SDCCmem.c
7789         * src/SDCCopt.c
7790         * src/SDCCpeeph.c
7791         * src/SDCCset.c
7792         * src/avr/ralloc.c
7793         * src/ds390/ralloc.c
7794         * src/izt/ralloc.c
7795         * src/mcs51/ralloc.c
7796         * src/pic/ralloc.c
7797         * src/pic16/ralloc.c
7798         * src/xa51/ralloc.c
7799         * src/z80/ralloc.c
7800         * src/z80/gen.c: removed unused label "release:"
7801
7802 2003-10-06  Borut Razem <borut.razem AT siol.net>
7803
7804         * src/SDCC.lex: removed definition of unused variables
7805           save_optimize and save_options
7806
7807 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7808
7809         * clean.mk: removed '=' in "-maxdepth=1"
7810         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7811         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7812
7813 2003-10-06  Borut Razem <borut.razem AT siol.net>
7814
7815         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7816           my_unput() replaced by unput()
7817
7818 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7819
7820         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7821         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7822         type-punned pointer will break strict-aliasing rules"
7823         Old LR behaviour is again default; Klaus' LR can be choosen by
7824         defining the environment variable LRKLAUS
7825         * src/SDCCBBlock.h
7826         * src/SDCCloop.c
7827         * src/SDCClrange.c
7828         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7829         * clean.mk: fixed removal of files in bin/CVS/
7830         * device/lib/clean.mk: fixed removal of directories small and large
7831         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7832         * src/SDCCicode.c,
7833         * src/SDCCval.c: removed superflous test for pedantic
7834
7835 2003-10-05  Borut Razem <borut.razem AT siol.net>
7836
7837         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7838           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7839           message "unmatched #pragma SAVE and #pragma RESTORE"
7840
7841 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7842
7843         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7844           assembly, critical functions, atomic, nojtbound)
7845
7846 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7847
7848         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7849         * src/SDCCBBlock.h
7850         * src/SDCCloop.c
7851         * src/SDCCloop.h
7852         * src/SDCClrange.c
7853
7854 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7855
7856         * src/z80/gen.h,
7857         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7858         * src/mcs51/gen.h
7859         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7860         * src/ds390/gen.h
7861         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7862         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7863         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7864
7865 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7866
7867         * src/z80/gen.c (genRet): fixed bug #524753
7868         * src/z80/gen.c (genCast): fixed internal error on cast from
7869         pointer to long
7870         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7871         fix for bug #477835 to the z80
7872         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7873         for tracking iCodes in the peephole optimizer for z80
7874
7875 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7876
7877         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7878         the other part of bug #814548
7879         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7880
7881 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7882
7883         * src/SDCCcse.c: fixed part of bug #814548
7884
7885 2003-09-28  Borut Razem <borut.razem AT siol.net>
7886
7887         * src/asm.c: rewrite of printILine() to use temporary file instead
7888           a pipe
7889         * src/xa51/main.c: commented out declaration of int rewinds
7890
7891 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7892
7893         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7894
7895 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7896
7897         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7898         * src/asm.c (printILine): Fixed bug #811015
7899
7900 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7901
7902         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7903         freeing.
7904
7905 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7906
7907         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7908         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7909         to correctly handle general case of AOP_PAIRPTR
7910         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7911
7912 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7913
7914         * src/mcs51/ralloc.c (fillGaps),
7915         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7916         register positioning bug)
7917
7918 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7919
7920         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7921
7922 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7923
7924         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7925         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7926         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7927         (ralloc doesn't intentionally do this now, but perhaps later)
7928         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7929         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7930         register positioning bugs (Fixed bug #762602 and #795325)
7931         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7932         (Fixed bug #808779)
7933         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7934         lines that --i-code-in-asm generates
7935
7936 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7937
7938         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7939         trying to fclose a FILE* that was already closed.
7940
7941 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7942
7943         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7944         of const struct should be treated as if const themselves)
7945
7946 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7947
7948         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7949
7950 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7951
7952         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7953         Unix (/n) and DOS (/r/n) line terminations.
7954
7955 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7956
7957         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7958         bug #613775
7959
7960 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7961
7962         * src/mcs51/gen.c (genFunction, genEndFunction),
7963         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7964         and restore of EA so that stack offsets to parameters are
7965         correct when using both critical and reentrant/stack-auto.
7966         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7967         size (can be triggered in error if sloc is shared between
7968         different sized objects)
7969         * device/include/float.h: fixed macros to explicitly use
7970         unsigned long where needed
7971
7972 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7973
7974         Feature req. 799831: added code to allow nesting of critical functions
7975         * src/mcs51/gen.c (genFunction, genEndFunction)
7976         * src/ds390/gen.c (genFunction, genEndFunction)
7977
7978 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7979
7980         * src/SDCCsymt.c (sclsFromPtr),
7981         * src/SDCCsymt.h,
7982         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7983         support for standard C idiom of memory mapped variables; for
7984         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7985         to xdata int at 0x1234 tempvar = 1.
7986         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7987         provided by Akiya ISHIDA
7988
7989 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7990
7991         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7992         * src/SDCCval.c (constVal): added reduction from int to char
7993         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7994         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7995         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7996         to ignore the sign
7997         * support/regression/tests/shifts.c: fixed
7998
7999 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8000
8001         * src/z80/gen.c (genXor): Fixed bug #805445
8002
8003 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8004
8005         Fixed bug #621531 (const & volatile confusion in the type chain).
8006         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
8007         refer to the const or volatile state of the pointer itself.
8008
8009         * src/SDCCast.c
8010         * src/SDCCglue.c
8011         * src/SDCCicode.c
8012         * src/SDCCsymt.c
8013         * src/SDCCval.c
8014         * src/SDCC.y
8015         * src/SDCCsymt.h
8016         * src/pic/gen.c
8017         * src/pic/ralloc.c
8018         * src/pic16/gen.c
8019         * src/pic16/ralloc.c
8020         * support/regression/tests/const.c
8021
8022 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8023
8024         When checking for duplicated modules, use absolute paths
8025         instead of relative paths.  Files changed:
8026
8027         * as/mcs51/lklib.c
8028         * link/z80/lklib.c
8029
8030 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8031
8032         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
8033
8034 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8035
8036         * device/include/string.h: added size_t typedef, changed
8037         prototypes to use size_t, eliminated separate reentrant and
8038         non-reentrant declarations, added _memmove declaration
8039         * device/lib/_memcpy.c: changed to use size_t instead of int,
8040         changed /4 to >>2 to avoid division library call
8041         * device/lib/_memcmp.c,
8042         * device/lib/_memset.c,
8043         * device/lib/_strncat.c,
8044         * device/lib/_strncpy.c,
8045         * device/lib/_strncmp.c: changed to use size_t instead of int
8046         * device/lib/_memmove.c: new file (fixed bug #772294)
8047         * device/lib/Makefile.in: added _memmove.c
8048         * device/lib/z80/asm_strings.s: fixed bug #772290
8049         * support/regression/tests/bitfields.c: attempt to fix host assertion
8050         failure on amd64-unknown-linux2.2
8051
8052 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8053
8054         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
8055         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
8056         * as/z80/asmain.c (main): fixed bug #801766
8057
8058 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
8059
8060         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
8061         compilers
8062
8063 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8064
8065         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
8066         reported in bug #800609
8067
8068 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
8069
8070         * Top header beautifications in src/pic16 directory:
8071           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
8072           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
8073           pcoderegs.h, ralloc.c, ralloc.h
8074         * main.c: added top header and GPL license notice
8075         * pcode.c: fixed the if-conditional warning
8076
8077 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
8078
8079         * device/lib/_mullong.c: replaced int by short for gcc
8080
8081 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8082
8083         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
8084         and JUMPTABLE iCodes properly now (worked by accident before)
8085         * src/mcs51/gen.c (leftRightUseAcc),
8086         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
8087         iCode properly now. Use getSize instead of nRegs since a & b
8088         aren't part of the nRegs tally.
8089
8090 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
8091
8092         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
8093         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
8094           before instructions that use the _STATUS register
8095
8096 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
8097
8098         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
8099         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
8100         fetching of the pointer
8101         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
8102         copied from genNearPointerSet()
8103         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
8104         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
8105         If they pop r0/r1 they must be called in the opposite order than aopOp().
8106         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8107         (resp. --stack-auto), prepared for --xstack
8108
8109 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8110
8111         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8112
8113 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8114
8115         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8116         these ports have their own __sdcc_external_start()
8117
8118 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8119
8120         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8121         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8122         type for bits was changed. It resulted in bit variables becoming
8123         global, which is not permitted in PIC 14 assembly output.
8124
8125 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8126
8127         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8128
8129 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8130
8131         Z80 and MCS51 linkers complaint if a public symbol is defined
8132         in more than one library module:
8133
8134         * as/mcs51/lklib.c
8135         * link/z80/lklib.c
8136         * as/mcs51/Makefile.in
8137
8138 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8139
8140         A few small changes that speed up the peephole optimizer.
8141
8142         * src/SDCCpeeph.c
8143
8144 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8145
8146         Try to make the peephole optimizer smarter by maintaining
8147         an association between the assembly source code and the
8148         iCodes that originated them. Put this information to use
8149         with a new peephole rule condition "notVolatile" so that
8150         the rules can be aggressive yet still safe.
8151
8152         * src/SDCCpeeph.c
8153         * src/SDCCpeeph.h
8154         * src/mcs51/gen.c
8155         * src/mcs51/peeph.def
8156
8157 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8158
8159         Fixed bug #741761
8160
8161         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8162         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8163         if the left or right operand symbols have the accuse flag set.
8164
8165 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8166
8167         Changed the type of the result of the ! (NOT) operator to char;
8168         previously it returned the same type as the source. This allows
8169         us to eliminate all the genFloatNot functions (all of its target
8170         implementations were very buggy) since !float can use the same
8171         code as !long now.
8172
8173         * src/SDCCicode.c (ast2iCode): ! returns char
8174         * src/mcs51/gen.c (genNot, genNotFloat),
8175         * src/ds390/gen.c (genNot, genNotFloat),
8176         * src/z80/gen.c (genNot, genNotFloat),
8177         * src/pic/gen.c (genNot, genNotFloat),
8178         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8179
8180 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8181
8182         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8183         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8184            during interrupts. Ensure WSAVE is located at a shared bank address.
8185         2. Fixed page selection in some places
8186         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8187            the registers name strings.
8188         4. Fixed "signed / unsigned compare" compiler warnings.
8189         5. The PIC port manages its own allocation of the general purpose
8190            registers, but makes no attempt to reuse them. As a result when
8191            compiling it soon runs out of general purpose registers. Some
8192            additional code was added to the files pcode.c and device.c to walk
8193            through the function call tree and rename the registers so that they
8194            get reused.
8195
8196         * src/pic/device.c
8197         * src/pic/gen.c
8198         * src/pic/glue.c
8199         * src/pic/pcode.c
8200         * src/pic/pcode.h
8201         * src/pic/ralloc.c
8202         * src/pic/ralloc.h
8203         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8204         genPlus() & genMinus() when the result is the same as left or right
8205
8206 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8207
8208         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8209
8210 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8211
8212         Made bitfield a distinct type from bit so that bitfields
8213         convert as per ANSI C and bits retain their traditional
8214         boolean style behaviour. Implemented bitfield support in
8215         the z80 port.
8216
8217         * src/SDCCsymt.h,
8218         * src/SDCCsymt.c,
8219         * src/SDCCast.c,
8220         * src/cdbFile.c,
8221         * src/mcs51/gen.c,
8222         * src/ds390/gen.c: bit v bitfield split
8223         * src/z80/gen.c: New support for bitfields
8224         * support/regression/tests/bitfields.c: reenabled z80,
8225         added more tests
8226
8227 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8228
8229         Rules 246.x, 247.x relate to bitfields, the others speed up
8230         access to xdata mapped I/O devices.
8231
8232         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8233
8234 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8235
8236         Cleaned up genPackBits and genUnpackBits and added two helper
8237         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8238         for literal assignments in genPackBits (thanks to Frieder for
8239         reminding me).
8240
8241         * src/mcs51/gen.c
8242         * src/ds390/gen.c
8243
8244 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8245
8246         Fixed bug #748310 (pointer to function type mishandled when the
8247         function name is omitted). Also fixed a SIGSEGV when a function
8248         attribute (reentrant, etc) is used on a non-function or on a
8249         function but misplaced before the parameter list.
8250
8251         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8252         bug #748310
8253         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8254         * support/Util/SDCCerr.h,
8255         * support/Util/SDCCerr.c: Added func attr misuse error msg
8256
8257 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8258
8259         Fixed bug #787649 by anonymous
8260         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8261         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8262
8263 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8264
8265         Fixed numerous bitfield problems.
8266
8267         * src/SDCC.y: More bitfield related error checking
8268         * src/SDCCsymt.h,
8269         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8270         * support/Util/SDCCerr.h,
8271         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8272         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8273         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8274         * support/regression/tests/bitfields.c: tests added
8275
8276 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8277
8278         Made the constant following the "interrupt" keyword optional. If
8279         omitted, the function will not automatically be given an entry
8280         in the interrupt vector table (similar to #pragma NOIV, but
8281         less syntacticly kludgy). The interrupt number is also now
8282         range checked. Also fixed a bug in the high order bit example
8283         in the manual.
8284
8285         * src/SDCC.y
8286         * src/SDCCmem.c
8287         * src/SDCCglue.c
8288         * src/SDCCsymt.h
8289         * support/Util/SDCCerr.c
8290         * support/Util/SDCCerr.h
8291         * doc/sdccman.lyx
8292
8293 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8294
8295         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8296         * src/SDCCicode.c (operandOperation): rewritten some ops
8297         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8298         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8299         other type
8300         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8301         be re-activated by defining REDUCE_LITERALS)
8302         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8303         unsigned, but are signed by default
8304         * src/SDCCval.c (constVal): rearranged
8305         * src/SDCCval.c (valMod): preliminary fix
8306         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8307         * support/regression/literalop.c: added, work in progress
8308
8309 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8310
8311         Generate warnings for useless declarations like "char data;"
8312         that don't do what new users expect.
8313
8314         * src/SDCC.y
8315         * support/Util/SDCCerr.h
8316         * support/Util/SDCCerr.c
8317
8318 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8319
8320         * src/SDCCval.c (valMult): fix overflow detection of negative int
8321
8322 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8323
8324         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8325
8326         Changes to support big endian targets:
8327
8328         * src/ports.h
8329         * src/SDCCglue.c
8330         * src/avr/main.c
8331         * src/ds390/main.c
8332         * src/izt/i186.c
8333         * src/mcs51/main.c
8334         * src/pic/main.c
8335         * src/pic16/main.c
8336         * src/xa51/main.c
8337         * src/z80/main.c
8338
8339 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8340
8341         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8342         * device/lib/time.c: fixed warning "integer overflow in expression"
8343
8344 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8345
8346         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8347         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8348         constants are unsigned; added recognition of "u" flag for unsigned
8349         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8350         * src/SDCCval.c (valDiv, valMod): fixed signdness
8351         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8352         signedness of modulo, left and right shift
8353         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8354         * support/Util/SDCCerr.h: added warning W_INT_OVL
8355         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8356         * src/SDCCast.c (ast_print): improved output of constants
8357
8358 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8359
8360         Fixed some warnings when building with MSVC:
8361
8362         * as\mcs51\asdata.c
8363         * as\z80\asdata.c
8364         * as\mcs51\asm.h
8365         * as\z80\asm.h
8366         * link\z80\aslink.h
8367         * link\z80\lkdata.c
8368         * link\z80\lkeval.c
8369         * link\z80\lkgb.c
8370         * link\z80\lkihx.c
8371         * link\z80\lks19.c
8372         * link\z80\lksym.c
8373         * support\cpp2\cpplib.c
8374         * src\ds390\gen.c
8375         * src\mcs51\gen.c
8376
8377 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8378
8379         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8380
8381 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8382
8383         * support\librarian\clean.mk: Do not remove Makefile.
8384         * support\librarian\Makefile: added.
8385
8386 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8387
8388         Added librarian to MSVC build:
8389         * all.dsp
8390         * sdcc.dsw
8391         * support\librarian\librarian.dsp
8392
8393         'configure' not needed for librarian, removed:
8394         * support\librarian\configure
8395         * support\librarian\configure.in
8396         * support\librarian\config_in.h
8397         * support\librarian\Makefile.in
8398
8399         Hopefully these ones built the librarian and the rest of sdcc properly:
8400         * Makefile
8401         * Makefile.common.in
8402
8403         Messed up 'configure', so revert to previous version:
8404         * configure
8405         * configure.in
8406
8407 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8408
8409         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8410         there, while the mantissa of a double is "only" 53 bits wide.
8411
8412 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8413
8414         Adding sdcclib to the build.  MSVC project coming soon.
8415         Files added/changed:
8416
8417         * support\librarian\clean.mk
8418         * support\librarian\configure
8419         * support\librarian\configure.in
8420         * support\librarian\config_in.h
8421         * support\librarian\Makefile.bcc
8422         * support\librarian\Makefile.in
8423         * support\librarian\sdcclib.c
8424         * Makefile.bcc
8425         * Makefile
8426         * Makefile.common.in
8427         * configure
8428         * configure.in
8429
8430 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8431
8432         Linker now complaints if linked modules have conflicting options, for
8433         example, one compiled using --model-large and another one compiled with
8434         --model-small.  The following files were modified:
8435
8436         * as\mcs51\asdata.c
8437         * as\mcs51\aslink.h
8438         * as\mcs51\asm.h
8439         * as\mcs51\asmain.c
8440         * as\mcs51\asout.c
8441         * as\mcs51\i51pst.c
8442         * as\mcs51\lkdata.c
8443         * as\mcs51\lklibr.c
8444         * as\mcs51\lkmain.c
8445         * as\z80\asdata.c
8446         * as\z80\asm.h
8447         * as\z80\asmain.c
8448         * as\z80\asout.c
8449         * as\z80\z80pst.c
8450         * link\z80\aslink.h
8451         * link\z80\lkdata.c
8452         * link\z80\lklibr.c
8453         * link\z80\lkmain.c
8454         * src\SDCCglue.c
8455
8456 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8457
8458         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8459         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8460
8461 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8462
8463         * src/z80/mappings.i: fix _mul[us][int,long] entries
8464
8465 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8466
8467         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8468
8469 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8470
8471         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8472         * support/regression/tests/bitopcse.c: added
8473         fixed warning:
8474         * src/avr/gen.c:
8475         * src/pic/gen.c:
8476         * src/pic16/gen.c:
8477         * src/z80/gen.c:
8478         * src/xa51/gen.c:
8479
8480 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8481
8482         added support for new library format to z80, gbz80 linkers:
8483         *link/z80/aslink.h
8484         *link/z80/lklex.c
8485         *link/z80/lklib.c
8486         *link/z80/lklist.c
8487
8488 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8489
8490         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8491         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8492
8493 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8494
8495         added DUMMY_READ_VOLATILE:
8496         * src/SDCC.y:
8497         * src/avr/gen.c:
8498         * src/xa51/gen.c:
8499         * src/z80/gen.c:
8500         * src/pic/gen.c:
8501         * src/pic16/gen.c:
8502         * src/mcs51/gen.c:
8503         * src/ds390/gen.c:
8504         * src/SDCCcse.c (algebraicOpts): many improvements
8505         * src/SDCCcse.h: removed algebraicOpts()
8506         * src/SDCCicode.c (picDummyRead): added
8507
8508 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8509
8510         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8511         "Insufficient space in data memory".
8512
8513 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8514
8515         * src/mcs51/gen.c: fixed bug #771358
8516         * src/z80/gen.c: fixed bug #759087
8517
8518 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8519
8520         * src/pic16/glue.c: minor cleanup by Vangelis
8521
8522 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8523
8524         * device/include/regc515c.h: fixed #758477
8525         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8526         * device/lib/_gptrput.c: saved a few bytes
8527         * my tab spacing is 8, yours too?)
8528         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8529         * device/lib/serial.c: process RX bytes earlier than TX bytes
8530         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8531
8532 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8533
8534         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8535
8536 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8537
8538     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8539
8540 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8541
8542         * device/lib/Makefile.in: bad fix, reverted to 1.43
8543
8544 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8545
8546         * device/lib/Makefile.in: added missing z80 object files
8547
8548 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8549
8550         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8551         pic16 progress by Vangelis:
8552         * src/SDCCglobl.h:
8553         * src/SDCCmain.c:
8554         * src/pic/Makefile:
8555         * src/pic:
8556         * pic/Makefile:
8557         * pic16/device.c:
8558         * pic16/device.h:
8559         * pic16/gen.c:
8560         * pic16/gen.h:
8561         * pic16/genarith.c:
8562         * pic16/glue.c:
8563         * pic16/main.c:
8564         * pic16/pcode.c:
8565         * pic16/pcode.h:
8566         * pic16/pcodepeep.c:
8567         * pic16/peeph.def:
8568
8569 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8570
8571     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8572
8573 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8574
8575     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8576     added gbz80 build to MSVC project.
8577     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8578     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8579     from 8051 stuff and setup so it links using a .lnk file.
8580
8581 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8582
8583     * support/librarian/sdcclib.c: sdcc librarian.
8584     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8585     with sdcclib.
8586
8587 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8588
8589     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8590
8591 2003-07-02  Borut Razem <borut.razem AT siol.net>
8592
8593         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8594         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8595         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8596         src/xa51/main.c, src/z80/main.c:
8597         virtualization of glue() function: each port has it's own glue function,
8598         which is accessed by do_glue function pointer in PORT.general structure
8599
8600 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8601
8602         * DS800C400 fun, improved ROM interface and tinibios.
8603
8604 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8605
8606         * More support for DS80C400. Now includes beginning of interface to ROM.
8607
8608 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8609
8610         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8611
8612 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8613
8614         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8615
8616 2003-06-19  Borut Razem <borut.razem AT siol.net>
8617
8618         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8619
8620 2003-06-19  Borut Razem <borut.razem AT siol.net>
8621
8622         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8623         fixed Z80 port - crt0.o: cannot open.
8624
8625 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8626
8627         * support/Util/MySystem.c (merge_command): revert bad fix
8628
8629 2003-06-18  Borut Razem <borut.razem AT siol.net>
8630
8631         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8632
8633 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8634
8635         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8636         option --use-stdout sends errors to stdout instead of stderr.
8637
8638 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8639
8640         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8641
8642 2003-06-15  Borut Razem <borut.razem AT siol.net>
8643
8644         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8645         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8646         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8647         fixed width array of pointers replaced with sets;
8648         multiple include and lib paths ared transferred to preprocessor and linker
8649         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8650         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8651         fixed width array of pointers
8652         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8653         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8654         fixupPath(), getPathDifference()
8655         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8656         fixed width array of pointers
8657
8658 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8659
8660         * src/pic16/ralloc.c: fix warnings
8661         * src/pic16/pcode.c: fix warning
8662
8663 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8664
8665          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8666         know all the details, but essentially this set of changes enable
8667         the pic16 port to generate movff instructions and generate assembler
8668         directives,
8669         * src/SDCCmain.c:
8670         * src/pic16/gen.c:
8671         * src/pic16/glue.c:
8672         * src/pic16/pcode.c:
8673         * src/pic16/device.c:
8674         * src/pic16/main.c:
8675         * src/pic16/pcode.h:
8676         * src/pic16/pcoderegs.c:
8677         * src/pic16/ralloc.c:
8678         * src/pic16/ralloc.h:
8679
8680 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8681
8682         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8683         added option --vc, so sdcc errors and warnings are compatible with
8684         Microsoft Visual Studio.
8685
8686 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8687
8688         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8689           device/lib/libfloat.lib: added atof function.
8690
8691 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8692
8693         * doc/sdccman.lyx: updated to Lyx 1.3
8694         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8695         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8696         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8697
8698 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8699
8700         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8701
8702 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8703
8704         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8705           additions to the "related tools/documentation" section
8706
8707 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8708
8709         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8710
8711 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8712
8713         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8714         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8715
8716 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8717
8718         * doc/sdccman.lyx: fix double dash and other minor things
8719         * doc/Makefile: fix double dash
8720
8721 2003-05-28  Karl Bongers(patches from Martin Helmling)
8722         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8723           condition and ignore commands.
8724
8725 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8726
8727         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8728           is in parts still quite out of date, I did changes as far as I felt makes sense
8729           for a non-native english speaker.
8730           Please feel free to add to the manual or to correct my changes.
8731         * doc/Makefile: undid touching the date of intermediate tex files.
8732
8733 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8734
8735         * doc/sdccman.lyx: Manual has an index now
8736
8737 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8738
8739         Finalize muluint/mulsint and mululong/mulslong merging:
8740         * device/lib/_mulint.c
8741         * device/lib/_mullong.c
8742         * device/lib/gbz80/mul.s
8743         * device/lib/gbz80/stubs.s
8744         * device/lib/z80/mul.s
8745         * device/lib/z80/stubs.s
8746         * src/SDCCsymt.c (initCSupport)
8747
8748 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8749
8750         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8751         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8752           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8753           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8754           instead of /Zm500.
8755
8756 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8757
8758         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8759           the regression tests I'm not brave enough to enable 245.b, 245.c
8760         * doc/sdccman.lyx: added latex preamble for hyperref package.
8761           Using pdflatex this will give you a hyperlinked pdf file with
8762           bookmarks. (prepend '%' before /usepackage if this breaks something)
8763
8764 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8765
8766          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8767
8768 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8769
8770         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8771
8772 2003-05-21    <johan AT balder>
8773
8774         * src/SDCCglue.c (printIval): fixed bug #739934
8775
8776 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8777
8778         Applied patch from bug 737905 (renamed yylineo to mylineno):
8779         * src/altlex.c
8780         * src/SDCCast.c
8781         * src/SDCglobl.h
8782         * src/SDCC.lex
8783         * src/SDCCsymt.c
8784         * src/SDCCval.c
8785         * src/pic16/pcode.c: Cleaned warnings
8786         * src/pic16/pcodeflow.c: Cleaned warnings
8787         * src/pic16/pcoderegs.c: Cleaned warnings
8788
8789 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8790
8791         * src/pic16/pcode.c: Cleaned warnings
8792         * src/pic16/pcodepeep.c: Cleaned warnings
8793         * src/pic16/ralloc.c: Cleaned warnings
8794
8795 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8796
8797         * doc/sdccman.lyx: fixed bug 739745
8798         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8799
8800 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8801
8802         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8803         it can be defined with CFLAGS when running configure
8804         * src/SDCCmain.c: fixed compiling + linking with object files
8805
8806 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8807
8808         * configure.in: configure for pic16 port,
8809             added --disable-pic16-port
8810         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8811         * src/SDCCmain.c: linkOptions is changed to set *,
8812             added if/endif conditional macros to remove options help
8813             messages from optionsTable when a port is not configured, added
8814             support for the PIc16 port in the ports table, when executing
8815             the compiler with no port specified on command line, a default
8816             port is selected with the new macro DEFAULT_PORT which is
8817             defined in port.h, in setDefaultOptions() linkOptions is removed
8818             from initialization assignment, since now it is a set,
8819             parseCmdLine uses setParseWithComma for linkOptions, in
8820             linkEdit() linkOptions are accessed with new function indexSet()
8821             which returns the i'th item of a set variable. See SDCCset.c, in
8822             linkEdit() when calling buildCmdLine(), added linkOptions as
8823             last argument. Now users can pass arguments to gplink via the
8824             -Wl option, main() uses pic16glue() to glue up pic16 programs
8825         * src/SDCCpeeph.c: various changes to support pic16
8826         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8827             return the i'th item of the set
8828         * src/SDCCset.h: added function prototype for indexSet()
8829         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8830         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8831         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8832             added macro DEFAULT_PORT
8833         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8834         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8835             generated
8836         * src/pic16/glue.c: commented out some error producing lines
8837         * src/pic16/main.c: __config directives are commented out to stop
8838             gpasm complaining and test the linkage with gplink, _linkCmd and
8839             _asmCmd changed to be more gplink and gpasm friendly
8840         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8841             produced an error when parsed, peep rule 12 is added to utilize
8842             movff, but it is commented out since the pCode does not support
8843             yet a command with 2 address arguments
8844
8845 2003-05-18    <johan AT balder>
8846
8847         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8848         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8849 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8850
8851         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8852   Added feature to script commands from file.
8853
8854 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8855
8856         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8857         * src/SDCCutil.c: include ctype.h for win32
8858
8859 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8860
8861         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8862
8863 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8864
8865         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8866   Fixed so you can set breakpoints prior to run, run does not stop
8867   on entry now.  Add tbreak.  Other enhancements and fixes for use
8868   with ddd.
8869
8870 2003-05-12  Borut Razem <borut.razem AT siol.net>
8871
8872         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8873
8874 2003-05-11  Borut Razem <borut.razem AT siol.net>
8875
8876         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8877         the path of bin directory, so that PATH is the only env. variable, which has to be set
8878         in case of standard installation.
8879         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8880         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8881         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8882
8883 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8884
8885         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8886         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8887         temp files are in the port dir; clean the gen/test directory when
8888         generating new test.c
8889         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8890         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8891         * support/regression/tests/zeropad.c: added
8892
8893 2003-05-09    <johan AT balder>
8894
8895         * src/SDCCglue.c: fixed bug #597940
8896
8897 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8898
8899         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8900   cache sfr, optimize next,step, fix off by one sourceline,
8901   support ddd list function.
8902         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8903
8904 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8905
8906         * support/regression/HTMLgen.py: added compare_s2f()
8907         * support/regression/Makefile: redo 1.27
8908         * support/regression/generate-cases.py: redo 1.5
8909
8910 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8911
8912         * support/regression/tests/float.c: workaround 33 bit hex constant
8913         * support/regression/tests/simplefloat.c: fix division for host
8914
8915 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8916
8917         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8918         that tame's the PIC's over-aggressive optimizer.
8919
8920 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8921
8922          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8923          support for MSVC.
8924
8925 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8926
8927         Initial support for DS80C400. "Hello world" runs on TINIm400
8928         (with polled I/O).
8929
8930 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8931
8932          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8933          * Some notes on ddd usage added in debugger/README
8934          Martin Helmling adding more features and fixes for ddd GUI debugger.
8935          Code added for nexti, stepi, up, down, and other adjustments.
8936
8937 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8938
8939         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8940         * src/pic/peeph.def Added two rules to optimize carry manipulation
8941         * src/pic/* removed debug printfs
8942
8943 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8944
8945         * debugger/mcs51/cmd.c: added header newalloc.h
8946
8947 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8948
8949         * as/Makefile: new EXEEXT
8950         * as/z80/Makefile: remove trailing slash of BUILDIR
8951         * as/z80/clean.mk: new EXEEXT
8952         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8953         * support/cpp2/Makefile.in: new EXEEXT
8954         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8955
8956 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8957
8958         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8959         EXEEXT was introduced to fix all related problems with targets
8960         "clean", "install" and "uninstall"; a couple of further flaws
8961         especially with "clean" have been fixed too
8962         * as/mcs51/Makefile.in
8963         * as/mcs51/clean.mk
8964         * as/z80/Makefile
8965         * Makefile
8966         * clean.mk
8967         * debugger/mcs51/Makefile.in
8968         * debugger/mcs51/clean.mk
8969         * link/z80/Makefile
8970         * link/z80/Makefile.in
8971         * link/z80/clean.mk
8972         * link/Makefile
8973         * packihx/Makefile.in
8974         * packihx/clean.mk
8975         * sim/ucsim/Makefile
8976         * sim/ucsim/clean.mk
8977         * sim/ucsim/avr.src/Makefile.in
8978         * sim/ucsim/avr.src/clean.mk
8979         * sim/ucsim/s51.src/Makefile.in
8980         * sim/ucsim/s51.src/clean.mk
8981         * sim/ucsim/xa.src/Makefile.in
8982         * sim/ucsim/xa.src/clean.mk
8983         * sim/ucsim/z80.src/Makefile.in
8984         * sim/ucsim/z80.src/clean.mk
8985         * sim/ucsim/main_in.mk
8986         * sim/ucsim/packages_in.mk
8987         * sim/ucsim/gui.src/Makefile.in
8988         * sim/ucsim/gui.src/serio.src/Makefile.in
8989         * sim/ucsim/gui.src/serio.src/clean.mk
8990         * src/Makefile.in
8991         * src/clean.mk
8992         * support/cpp2/Makefile.in
8993         * support/cpp2/clean.mk
8994         * support/makebin/Makefile
8995         * support/makebin/clean.mk
8996         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8997         * doc/sdccman.lyx: --program-suffix no longer needed
8998
8999 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
9000
9001          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
9002          Martin Helmling added support for ddd GUI debugger.
9003          Code added to display assembly, set variables, and other commands
9004          to interface to ddd.
9005
9006 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
9007
9008         * as/Makefile: fix target clean
9009         * as/clean.mk: fix target clean
9010         * as/z80/clean.mk: fix target clean
9011
9012 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
9013
9014         * Makefile.common.in: added  AT EXEEXT AT
9015         * configure.in: removed all mingw32 stuff
9016         * configure: rebuilt from configure.in
9017         * doc/sdccman.lyx: updated section "installation"
9018         * support/scripts/sdcc_mingw32: adapted to configure
9019         * support/scripts/sdcc_cygwin_mingw32: added
9020
9021 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
9022
9023         * src/pic Added object file support for the PIC port
9024         * src/pic Applied patch from Craig Franklin (this started the object file support)
9025         * src/regression Updated the PIC regression tests for object files
9026
9027 2003-04-20  Borut Razem <borut.razem AT siol.net>
9028
9029         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
9030           lklex.c: In function `getfid':
9031           lklex.c:203: warning: array subscript has type `char'
9032         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
9033           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
9034         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
9035           stack handling macros
9036
9037 2003-04-19  Borut Razem <borut.razem AT siol.net>
9038
9039         * "handling space characters in file path" task:
9040         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
9041         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
9042         * support/Util/MySystem.h: make it self-sufficient
9043         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
9044           src/z80/main.c, sdcc/as/mcs51/lklex.c:
9045           handling space characters in file path
9046         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
9047           (it will be used by assemblers, which have their own includes, e.g. gpasm)
9048         * support/Util/MySystem.c: handling space characters in executable's path
9049
9050 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
9051
9052         * as/z80/Makefile: fix permanent rebuild of z80
9053         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
9054         * support/regression/tests/bitfields.c: added Johan's bitfields.c
9055
9056 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
9057
9058         * src/SDCCopt.c: add special case optimization to replace modulo by
9059           a power of two with a bitwise AND.
9060
9061 2003-04-18    <johan AT balder>
9062
9063         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
9064
9065 2003-04-17    <johan AT balder>
9066
9067         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
9068         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
9069
9070 2003-04-13  Borut Razem <borut.razem AT siol.net>
9071
9072         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
9073         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
9074           fixed mingw problem in adl_NORMALIZE_PATH
9075
9076 2003-04-12  Borut Razem <borut.razem AT siol.net>
9077
9078         * fixed "#pragma SAVE/RESTORE can not be nested":
9079         * src/SDCC.lex: reworked pragma handling functions
9080         * sdcc/src/SDCCglobl.h: reworked stack handling macros
9081         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
9082
9083 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9084
9085         * src/SDCCutil.c (pathEquivalent): defined but not used
9086         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
9087         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
9088         * configure: rebuilt from configure.in
9089         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9090         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
9091         * device/include/Makefile.in: replace sdcc_datadir
9092         * device/lib/Makefile.in: replace sdcc_datadir
9093         * Makefile.common.in: add LDFLAGS from configure
9094         * packihx/Makefile.in: use LDFLAGS
9095         * src/Makefile.in: use LDFLAGS
9096         * support/cpp2/Makefile.in: add LDFLAGS from configure
9097         * support/makebin/Makefile: use LDFLAGS
9098         * .version: bumped version number to 2.3.5
9099
9100 2003-04-12  Borut Razem <borut.razem AT siol.net>
9101
9102         * completed "different paths" task:
9103         * src/SDCCmacro.c: fixed bug in handling quotes
9104         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
9105         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9106
9107 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9108
9109         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9110
9111 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9112
9113         * ds390/gen.c ds390/peeph.def: fix bug 706781
9114
9115 2003-04-11  Borut Razem <borut.razem AT siol.net>
9116
9117         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9118
9119 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9120
9121         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9122         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9123          set - this bit used to not be set...).
9124         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9125           bad code in PIC Port
9126         * src/regression/and2.c added to test bug 609268
9127         * src/regression/Makefile added and2.c to regression test
9128
9129
9130 2003-04-08    <johan AT CP255758-A>
9131
9132         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9133         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9134         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9135
9136 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9137
9138         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9139         fix bug #487815
9140         * support/cpp2/Makefile.in: fix bug #487815
9141         * configure: rebuilt from configure.in
9142         * Makefile.common.in: docdir changed, new path suffixes
9143         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9144         * sdcc_vc_in.h: reflect changes from sdccconf.h
9145         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9146         * src/SDCCutil.h: remove BINDIR hack
9147         * doc/sdccman.lyx: update new path hierarchy
9148
9149 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9150
9151         * src/SDCCpeeph.c: added okToRemoveSLOC test
9152
9153 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9154
9155         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9156
9157 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9158
9159         * src/SDCCpeeph.c: added labelIsReturnOnly test
9160         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9161
9162 2003-04-05    <johan AT balder>
9163
9164         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9165         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9166         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9167         * src/SDCCast.c: fixed a warning
9168         * src/SDCCast.h: fixed a warning
9169         * src/SDCCicode.c (operandFromAst): fixed a warning
9170
9171 2003-04-04    <johan AT balder>
9172
9173         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9174         * src/SDCCast.c (decorateType): fixed bug #715076
9175         * src/SDCC.y: fixed bug #702907
9176
9177 2003-04-03    <johan AT balder>
9178
9179         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9180         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9181         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9182         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9183         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9184
9185 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9186
9187         * _decdptr.c: fix return values
9188         * _gptrget.c: fix return values
9189         * _gptrgetc.c: fix return values
9190         * _gptrput.c: fix return values
9191         * _mulint.c: fix return values
9192         * as/z80/Makefile: fix 'make -j' problem
9193
9194 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9195
9196         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9197         * configure.in: big cleanup, updated to autoconf 2.5x
9198         * configure: rebuilt from configure.in
9199         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9200         * sdcc_vc_in.h: reflect changes from sdccconf.h
9201         * doc/Makefile: fixed a flaw in "make install"
9202
9203 2003-04-02    <johan AT balder>
9204
9205         * src/ds390/gen.c (genCmp): no comments
9206         * src/mcs51/gen.c (genCmp): no comments
9207         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9208         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9209
9210 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9211
9212         * support/regression/generate-cases.py: place generated file in given sub directory
9213         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9214         * support/regression/Makefile: improvements for 'make -j';
9215         side effect: it's simpler and faster now
9216
9217 2003-03-31  Borut Razem <borut.razem AT siol.net>
9218
9219         * src/z80/main.c: link-{port} and as-{port} defined without path
9220         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9221
9222 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9223
9224         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9225
9226 2003-03-30  Borut Razem <borut.razem AT siol.net>
9227
9228         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9229           changed type of list parameter to set
9230         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9231         * src/port.h: changed type of do_assemble() parameter to set
9232         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9233           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9234           definition of "cppoutfilename" macro with NULL value in preProcess()
9235         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9236         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9237         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9238           replaced with set *binPathSet
9239         * shash_add() deallocates the item, if allready exsists, before adding the new one
9240         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9241
9242 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9243
9244         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9245           a nested for loop bug in the PIC port
9246         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9247           for loops
9248
9249 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9250
9251         * support/Util/dbuf.h: remove C++ stuff to make it portable
9252
9253 2003-03-28  Borut Razem <borut.razem AT siol.net>
9254
9255         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9256           literal strings in stringLiteral()
9257         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9258         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9259           to the project
9260
9261 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9262
9263         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9264
9265 2003-03-26    <johan AT balder>
9266
9267         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9268         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9269         * src/SDCCast.c (decorateType): fixed " -v < 3"
9270
9271 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9272
9273         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9274         Added Lenny Story's debug infrastructure changes:
9275         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9276         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9277         * src/cdbFile.c: added
9278         * src/SDCCdebug.c: added
9279         * src/SDCCdebug.h: added
9280         * src/SDCCast.c (createFunction)
9281         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9282         * src/SDCCmain.c (parseCmdLine, main)
9283         * src/SDCCmem.c (redoStackOffsets)
9284         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9285         * src/SDCCsymt.h
9286         * src/common.h
9287         * src/avr/gen.c (genAVRCode)
9288         * src/ds390/gen.c (gen390Code)
9289         * src/mcs51/gen.c (gen51Code)
9290         * src/pic/gen.c (genpic14Code)
9291         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9292         * src/xa51/gen.c (genXA51Code)
9293         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9294
9295 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9296
9297         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9298         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9299
9300 2003-03-22    <johan AT balder>
9301
9302         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9303
9304 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9305
9306         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9307         * doc/cdbfileformat.lyx: added, written by Lenny Story
9308         * doc/Makefile: added cdbfileformat.lyx
9309         * doc/clean.mk: added cdbfileformat.lyx
9310
9311 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9312
9313         * src/mcs51/peeph.def: fix bug #705773
9314
9315 2003-03-20    <johan AT balder>
9316
9317         An sfr/sbit can have an "at #" AND an initializer
9318         * src/SDCCsymt.c (checkSClass):
9319         * src/SDCCmem.c (allocGlobal):
9320         * src/SDCCmem.c (allocLocal):
9321         * src/SDCCast.c (createBlock):
9322
9323 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9324
9325         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9326
9327 2003-03-16    <johan AT balder>
9328
9329         Undid the hackup of const and volatile, the problem is much bigger
9330         * src/SDCC.y:1.65
9331         * src/SDCCast.c:1.171
9332         * src/SDCCglue.c:1.138
9333         * src/SDCCicode.c:1.146
9334         * src/SDCCsymt.c:1.150
9335         * src/SDCCval.c:1.65
9336
9337 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9338
9339         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9340         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9341
9342 2003-03-13    <johan AT balder>
9343
9344         Hackup const and volatile modifiers in type chains a bit:
9345         * src/SDCC.y:1.63
9346         * src/SDCCast.c:1.169
9347         * src/SDCCglue.c:1.136
9348         * src/SDCCicode.c:1.143
9349         * src/SDCCsymt.c1.146
9350         * src/SDCCsymt.h1.59
9351         * src/SDCCval.c:1.63
9352
9353 2003-03-12    <johan AT balder>
9354
9355         * src/SDCCBBlock.h: more LRH debugging junk
9356         * src/SDCCcflow.h: more LRH debugging junk
9357         * src/SDCCloop.c: more LRH debugging junk
9358         * src/SDCC.y (struct_declaration): fixed bug #697590
9359         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9360         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9361         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9362
9363 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9364         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9365         test function names must now match exactly).
9366         * src/SDCCcse.c: added special case in findCheaperOp to allow
9367         extending a short integer. Makes less awful code for bug 700121 test case.
9368
9369 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9370
9371         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9372         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9373
9374 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9375
9376         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9377         actually called (operandsNotEqual() was called for all
9378         operandsNotEqualX tests).
9379
9380 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9381
9382         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9383         with shorter literals. Fixes bug 700121.
9384
9385 2003-03-11    <johan AT balder>
9386
9387         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9388
9389 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9390
9391         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9392         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9393
9394 2003-03-10  Borut Razem <borut.razem AT siol.net>
9395
9396         * src/SDCCmain.c: pipe preprocessor's output
9397         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9398         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9399         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9400         which closes all pipes in pipeSet set
9401         * src/SDCCset.c: free deleted item in function deleteSetItem()
9402         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9403         moved from z80 to src subproject
9404         * .version: increased version number to 2.3.4
9405
9406 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9407
9408         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9409         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9410         * support/regression/ports/xa51/spec.mk: fix typo
9411
9412 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9413
9414         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9415
9416 2003-03-09  Borut Razem <borut.razem AT siol.net>
9417
9418         * src/SDCCmain.c: pipe preprocessor's output
9419         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9420         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9421         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9422         which closes all pipes in pipeSet set
9423         * src/SDCCset.c: free deleted item in function deleteSetItem()
9424         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9425         moved from z80 to src subproject
9426
9427 2003-03-09  Borut Razem <borut.razem AT siol.net>
9428
9429         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9430         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9431         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9432         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9433         * src/SDCCglobl.h: unification of WIN32 native definitions
9434
9435 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9436
9437         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9438
9439 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9440
9441         * src/configure.in:   check for endianess (even while cross-compiling)
9442         * src/configure:      check for endianess (even while cross-compiling)
9443         * src/configure_in.h: check for endianess (even while cross-compiling)
9444         * src/avr/gen.c:        remove old endianess stuff
9445         * src/mcs51/gen.c:      remove old endianess stuff
9446         * src/ds390/gen.c:      remove old endianess stuff
9447         * src/pic/gen.c:        remove old endianess stuff
9448         * src/pic/genarith.c:   remove old endianess stuff
9449         * src/pic/glue.c:       fix endianess check
9450         * src/pic16/gen.c:      remove old endianess stuff
9451         * src/pic16/genarith.c: remove old endianess stuff
9452         * src/pic16/glue.c:     fix endianess check
9453         * src/xa51/gen.c:       remove old endianess stuff
9454         * src/z80/gen.c:        fix endianess check
9455         * src/SDCCglue.c:       fix endianess check
9456         * src/ds390/peeph.def: fix bug 700036
9457
9458 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9459
9460         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9461         * src/configure: find appropriate data-types on host for SDCC's int and long
9462         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9463         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9464         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9465
9466 2003-03-07    <johan AT balder>
9467
9468         Just a big NOOP:
9469                 some minor cleanups before the big shot
9470                 OP_DEFS and OP_USES now use Kevin's protection
9471                 new option --nolabelopt
9472
9473         * src/SDCCBBlock.c:
9474         * src/SDCCast.c,:
9475         * src/SDCCcflow.c:
9476         * src/SDCCcse.c:
9477         * src/SDCCicode.c:
9478         * src/SDCCicode.h:
9479         * src/SDCClabel.c:
9480         * src/SDCCloop.c:
9481         * src/SDCCmain.c:
9482         * src/ds390/ralloc.c:
9483         * src/mcs51/ralloc.c:
9484         * src/pic/ralloc.c:
9485         * src/xa51/ralloc.c:
9486         * src/z80/ralloc.c:
9487
9488 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9489
9490         * src/pic/pcode.c (get_op): fix 64 bit warnings
9491         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9492         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9493         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9494         * support/regression/tests/malloc.c: fix 64 bit warnings
9495
9496 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9497
9498         * src/mcs51/gen.c (genMinus): fixed bug 696436
9499
9500 2003-03-02  Borut Razem <borut.razem AT siol.net>
9501
9502         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9503
9504 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9505
9506         * configure.in: test for mkstemp
9507         * sdccconf_in.h: add HAVE_MKSTEMP
9508
9509 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9510
9511         * device/include/ctype.h: removed warning while using --stack-auto
9512         * device/include/malloc.h: removed warning while using --stack-auto
9513         * device/include/string.h: removed warning while using --stack-auto
9514
9515 2003-02-23  Borut Razem <borut.razem AT siol.net>
9516
9517         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9518         because NDEBUG is defined (see man assert)
9519         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9520
9521 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9522
9523         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9524         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9525
9526 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9527
9528         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9529         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9530
9531 2003-02-18    <johan AT balder>
9532
9533         * as/mcs51/asmain.c (asmbl): module can start with a digit
9534         * as/z80/asmain.c (asmbl): module can start with a digit
9535
9536 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9537
9538         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9539         * src/asm.c: fix pipe() for Mingw32
9540
9541 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9542
9543         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9544         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9545         make -V work again; --c1mode reads now from stdin
9546         * doc/sdccman.lyx: added --c1mode
9547         * support/Util/SDCCerr.c: new messages for c1 mode
9548         * support/Util/SDCCerr.h: new messages for c1 mode
9549         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9550
9551 2003-02-15    <johan AT balder>
9552
9553         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9554
9555 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9556
9557         * doc/sdccman.lyx: Environment variables, -o and other minor things
9558
9559 2003-02-14    <johan AT balder>
9560
9561         * src/xa51/main.c: before anyone really tries to use it :)
9562
9563         * Install doc's in share/sdcc/doc
9564         * removed some obsolete files
9565         * Do a proper make distclean and uninstall
9566         M Makefile.common.in
9567         R sdccbuild.sh
9568         M as/Makefile
9569         M device/include/Makefile.in
9570         M device/lib/Makefile.in
9571         M doc/sdccman.lyx
9572         M link/Makefile
9573         M sim/ucsim/doc/Makefile.in
9574         M src/clean.mk
9575         R src/avr/peeph.rul
9576         R src/xa51/peeph.rul
9577         M support/cpp2/Makefile.in
9578         M support/makebin/Makefile
9579
9580
9581 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9582
9583         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9584
9585 2003-02-10  Borut Razem <borut.razem AT siol.net>
9586
9587         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9588         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9589         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9590         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9591         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9592         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9593         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9594         src/z80/Makefile.bcc: Borland Makefile cleanup
9595         * as/z80/Makefile.bcc: Added Borland Makefile
9596         * support/cpp2/borland.h: Removed
9597
9598 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9599
9600         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9601         * src/SDCC.lex: new pragma NOIV
9602         * src/SDCCglobl.h: new pragma NOIV
9603         * src/SDCCmem.c: new pragma NOIV
9604
9605 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9606
9607         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9608
9609 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9610
9611         * src/SDCCmain.c: signal handling is switched off by --debug
9612         * doc/Makefile: small fix for install; use clean.mk again
9613         * doc/clean.mk: clean *.pdf and *.html too
9614
9615 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9616
9617         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9618         * device/lib/printfl.c: fix a ds390 bug by making it portable
9619         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9620         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9621         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9622         * debugger/mcs51/cmd.c: converted multi-line string literals
9623         * sim/ucsim/globals.cc: converted multi-line string literals
9624         * src/SDCCmain.c: introduced signal handler to remove temp files
9625         * doc/Makefile: small tweaks, implement clean
9626         * doc: removed generated files
9627
9628 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9629
9630         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9631         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9632         Address Record is not correctly generated for DS390."
9633
9634 2003-02-02  Borut Razem <borut.razem AT siol.net>
9635
9636         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9637         * as/mcs51/asm.h: fixed compilation with Borland C
9638         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9639         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9640         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9641         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9642         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9643         src/z80/Makefile.bcc: delete $(LIB) only if exist
9644         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9645
9646 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9647
9648         * device/include/malloc.h: introduced NULL
9649         * device/include/string.h: introduced NULL
9650         * device/include/stdlib.h: introduced NULL
9651         * device/lib/_memcpy.c: removed NULL
9652         * device/lib/_strcat.c: removed NULL
9653         * device/lib/_strchr.c: removed NULL
9654         * device/lib/_strcmp.c: removed NULL
9655         * device/lib/_strcpy.c: removed NULL
9656         * device/lib/_strcspn.c: removed NULL
9657         * device/lib/_strlen.c: removed NULL
9658         * device/lib/_strncat.c: removed NULL
9659         * device/lib/_strncmp.c: removed NULL
9660         * device/lib/_strncpy.c: removed NULL
9661         * device/lib/_strpbrk.c: removed NULL
9662         * device/lib/_strrchr.c: removed NULL
9663         * device/lib/_strspn.c: removed NULL
9664         * device/lib/_strstr.c: removed NULL
9665         * device/lib/_strtok.c: removed NULL
9666         * device/lib/malloc.c: removed NULL, include own header
9667
9668 2003-02-02    <johan AT balder>
9669
9670         * 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
9671         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9672         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9673         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9674         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9675         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9676
9677 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9678
9679         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9680         area 'DATA'"
9681
9682 2003-02-01    <johan AT balder>
9683
9684         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9685
9686 2003-01-31    <johan AT CP255758-A>
9687
9688         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9689
9690 2003-01-30    <johan AT balder>
9691
9692         * src/SDCCBBlock.c: automatic bug detection
9693         * src/SDCCicode.c: automatic bug detection
9694
9695 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9696
9697         * src/SDCCglobl.h:   now --xram-size 0 works
9698         * src/SDCCmain.c:    now --xram-size 0 works
9699
9700 2003-01-29    <johan AT balder>
9701
9702         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9703
9704 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9705
9706         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9707         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9708         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9709         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9710         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9711         * src/SDCCmain.c:    Added options --xram-size and --code-size
9712
9713 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9714
9715         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9716         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9717
9718 2003-01-27    <johan AT balder>
9719
9720         * src/SDCC.y: fixed bug #613764
9721
9722 2003-01-26    <johan AT balder>
9723
9724         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9725         * src/SDCCsymt.h: fixed bug #673374
9726         * src/SDCCglue.c: fixed bug #661910
9727         * src/SDCCast.c: fixed bug #458099 and 673374
9728
9729 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9730
9731         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9732         * as/mcs51/strcmpi.h: added
9733         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9734         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9735         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9736         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9737         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9738         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9739         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9740         * as/mcs51/Makefile.aslink: new module strcmpi
9741         * as/mcs51/Makefile.asx8051: new module strcmpi
9742         * as/mcs51/Makefil.bcc: new module strcmpi
9743         * as/mcs51/Makefile.in: new module strcmpi
9744         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9745
9746 2003-01-26    <johan AT balder>
9747
9748         * src/SDCCglue.c: reverted back to 1.124
9749         * src/SDCCast.c: reverted back to 1.156
9750         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9751
9752 2003-01-25    <johan AT balder>
9753
9754         * src/SDCCglue.c: A better fix for bug #661910
9755         * src/SDCCast.c: A better fix for bug #661910
9756         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9757
9758 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9759
9760         * src/Makefile.in: remove spawn.o
9761         * src/SDCCmain.c: remove spawn.h
9762         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9763         * src/spawn.c: removed
9764         * src/spawn.h: removed
9765         * support/regression/ports/ds390/spec.mk: link with -r
9766
9767 2003-01-24    <johan AT CP255758-A>
9768
9769         * src/ds390/gen.c (aopOp): fixed bug #667458
9770         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9771         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9772         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9773
9774 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9775
9776         * src/mcs51/peeph.def: better assembler identation by Frieder
9777         * src/mcs51/gen.c: better assembler identation by Frieder
9778
9779 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9780
9781         * as/z80/string.h: removed for gcc 3.2
9782         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9783         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9784
9785 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9786
9787         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9788         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9789         * support/regression/Makefile: separate temp files for ports
9790         * support/regression/generate-cases.py: separate temp files for ports
9791         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9792         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9793
9794 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9795
9796         * moved tinitalk to device/examples/ds390
9797
9798 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9799
9800         * as/mcs51/lkmem.c: rflag is for DS390
9801         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9802         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9803                          (linkEdit): move mem- and map-files the same way as ihx-files
9804         * src/z80/main.c (_setDefaultOptions): removed --generic
9805         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9806         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9807         * src/pic/glue.c (picglue): --c1mode works again
9808         * src/pic16/glue.c (pic16glue): --c1mode works again
9809         * src/asm.c (printCLine): fix #660034
9810
9811 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9812
9813         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9814         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9815         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9816         * as/mcs51/lkmem (summary): better fix for sp problem
9817         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9818         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9819         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9820                                               remove --stack-after-data
9821
9822 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9823
9824         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9825         * src/SDCCutil.c (join): ugly bug: missing '\0'
9826         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9827
9828 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9829
9830         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9831         * src/port.h: typo
9832         * src/pic/main.c (_asmCmd): gpasm supports -o
9833         * src/z80/main.c: more general macros
9834         * device/lib/Makefile.in: remove intermediate files
9835
9836 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9837
9838         * .version: Bumped version number to 2.3.3
9839         * src/SDCCBBlock.c: new option -o
9840         * src/SDCCglobl.h: new option -o
9841         * src/SDCCglue.c: new option -o
9842         * src/SDCCmain.c: new option -o
9843         * src/asm.c: new option -o
9844         * src/ds390/main.c: new option -o
9845         * src/pic/glue.c: new option -o
9846         * src/pic/pcode.c: new option -o
9847         * src/pic/ralloc.c: new option -o
9848         * src/pic16/glue.c: new option -o
9849         * src/pic16/pcode.c: new option -o
9850         * src/pic16/ralloc.c: new option -o
9851         * src/z80/main.c: new option -o
9852         * device/lib/Makefile.in: use -o
9853         * support/regression/ports/ds390/spec.mk: use -o
9854         * support/regression/ports/gbz80/spec.mk: use -o
9855         * support/regression/ports/mcs51/spec.mk: use -o
9856         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9857         * support/regression/ports/z80/spec.mk: use -o
9858         * support/regression/ports/ucz80/spec.mk: use -o
9859         * support/regression/ports/xa51/spec.mk: use -o
9860         * support/regression/fwk/lib/timeout.c: fix usage string
9861
9862 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9863         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9864
9865 2003-01-07    <johan AT balder>
9866
9867         * src/SDCCast.c (decorateType): fixed bug #600035
9868
9869 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9870         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9871         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9872         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9873         * src/pic/pcode.c: outcommented unused variable to remove warnings
9874         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9875
9876 2003-01-06    <karl AT turbobit.com>
9877         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9878    regression tests.
9879
9880 2003-01-06    <johan AT balder>
9881
9882         * src/SDCCicode.c: fixed array add
9883
9884 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9885         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9886         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9887
9888 2003-01-04    <johan AT balder>
9889
9890         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9891
9892 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9893         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9894
9895 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9896         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9897         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9898
9899 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9900         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9901
9902 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9903         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9904
9905 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9906         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9907
9908 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9909
9910     * in \sdcc\as\mcs51\ changed these files in order to create an
9911     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9912     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9913     following files to include the previous two files: aslink.dsp,
9914     Makefile.aslink, Makefile.bcc, and Makefile.in.
9915
9916     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9917     .adb instead of .cdb
9918
9919 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9920
9921         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9922         value from option --iram-size.
9923
9924 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9925
9926         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9927         dram[] array.
9928
9929 2002-09-18    <wiml AT hhhh.org>
9930
9931         * SDCClrange.h: exposed setFromRange() and setToRange()
9932         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9933           packRegsForAccUse() (bug 542397)
9934         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9935           multiple times and emitting the fetch operations more than once
9936           added aopGetUsesAcc() function to allow binary operators to
9937           fetch their operands in the correct order; made genMinus() emit
9938           compact code for X = LITERAL - Y
9939
9940 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9941         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9942         sprintf() in line 1267.
9943
9944 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9945         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9946         like ports.
9947
9948 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9949         Changes to aslink (All the changes are marked with 'JCF'):
9950
9951         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9952         summary().
9953
9954         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9955         area BSEG.  Also moves, if possible, the DATA area down into the internal
9956         ram so more space is available.
9957
9958         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9959         sflag.
9960
9961         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9962         not bytes.  Function summary() which creates a memory usage summary
9963         file with extension .mem.  Reports of overlaping stack and small stack
9964         size.  If the space for the stack is less than 16 bytes aslink trows a
9965         warning.
9966
9967         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9968         the 8051.  Option 'y' for memory summary output file.
9969
9970         Changes to sdcc (All the changes are marked with 'JCF'):
9971
9972         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9973
9974         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9975         overlaying area for it (uses RegBankUsed[4]).
9976
9977         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9978         bank zero as used by default.  By default aslink locates the stack
9979         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9980         the creation of the .mem file.  Delegates the allocation of data area
9981         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9982         the begining of the stack area to aslink.
9983
9984         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9985         glue() in SDCCglue.c creates an area for it.
9986
9987 2002-09-03  Borut Razem <borut.razem AT siol.net>
9988         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9989         sdcc/src/pic/glue.c:
9990         introduced atexit() handler for teporay files removal in case of
9991         errors, assertions, ...
9992
9993 2002-08-29  Borut Razem <borut.razem AT siol.net>
9994         * sdcc/support/cpp2/auto-host_vc_in.h:
9995         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9996         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9997         Maybe there is a similar problem with BORLANDC? It should be checked!
9998
9999         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
10000         corrected improper use of assert: the assignment to clr variable was done inside the assert.
10001         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
10002         was not executed, and the compiler (cl) launched a warning:
10003         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
10004
10005 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
10006         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
10007
10008 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
10009         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
10010
10011         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10012           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
10013           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
10014           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10015           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
10016           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
10017           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
10018         - added Release configuration in VS projects
10019         - review of compiler an linker options
10020         - VC .exe files are generated in bin_vc directory, not to interfere
10021           with binaries generated from other projects (cygwin, mingw, bcc ...)
10022
10023         * sdcc/src/yacc.dsp: added
10024
10025         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
10026         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
10027         and insert the version number definitions from .version
10028
10029         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
10030
10031         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
10032         added - genarate auto-host.h using auto-host_vc_in.h as template
10033
10034         * sdcc/sdcc_vc.h,
10035         removed from CVS, generated automatically
10036
10037 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
10038         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
10039
10040 2002-08-11  Borut Razem <borut.razem AT siol.net>
10041         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
10042
10043 2002-08-10  Borut Razem <borut.razem AT siol.net>
10044         * src/SDCCmain.c (main):
10045         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
10046         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
10047         The consequence was that some temporary files were not removed.
10048
10049         * src/SDCCglue.c:
10050         unification of code in functions tempfilename() and tempfile():
10051         function tempnam() is defined in Visual Studio 6.0 and .NET
10052
10053         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
10054
10055         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
10056           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
10057         - removed compiler command line option /WX: Treats all warnings as errors
10058         - update a list of source files, included into the project
10059
10060         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
10061           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
10062         changed project type to Generic Project so that can be correcly converted to VS.NET project
10063
10064         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
10065
10066         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
10067
10068         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
10069
10070         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
10071         added return 0 statements after assert() to make compiler happy
10072
10073         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
10074         added newline in the def file to keep MSC compiler satisfied
10075
10076         * sdcc/src/z80/gen.c:
10077         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
10078           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
10079         - solved MSC error in function aopDump()
10080
10081         * sdcc_vc.h: define PREFIX as "\\sdcc"
10082
10083 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
10084         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
10085
10086 2002-06-22  Scott Dattalo <scott AT dattalo.com>
10087         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
10088         - Rewrote the register banking algorithm.
10089         - Added pCode live-range analysis to registers (for now, only non-used and
10090         singly-used registers optimized away)
10091
10092         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
10093
10094         * 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.
10095
10096 2002-05-10  Scott Dattalo <scott AT dattalo.com>
10097         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
10098
10099 2002-04-22  Michael Hope  <michaelh AT vroom>
10100
10101         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
10102
10103         * configure.in (DD_COPT): Added include support required for gbdk.
10104
10105         * .version: Bumped version number just to increase it.
10106
10107         * src/SDCCmain.c: Added -nostdinc to the default options.
10108
10109 2002-04-15  Michael Hope  <michaelh AT vroom>
10110
10111         * device/lib/z80/printf.c (sprintf): Added.
10112
10113         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10114
10115         * src/z80/peeph.def: Added transpose redundent load rule.
10116
10117         * src/z80/main.c: Added force callee saves for jaune.
10118
10119         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10120
10121         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10122
10123 2002-03-28  Johan Knol  <johan AT balder>
10124
10125         * src/SDCCval.c: fixed bug #532436
10126
10127 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10128         * /src/port.h:
10129         Added "char *Processor" field to the port structure.
10130
10131         * /src/SDCCmain.c:
10132         Added -p option. Allows port dependent processor to be specified.
10133
10134         * all ports:
10135         Initialized the new field char *Processor field to NULL in all ports
10136
10137         * /src/pic/*:
10138         Compiler generated registers for interrupt context saving
10139         were not getting allocated.
10140
10141 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10142
10143         * /src/SDCCast.c:
10144         Fixed left shift. Will promote the left side of a left shift
10145         if a) left shifting more than size of operand or b) when assigned
10146         to something size > size of left side
10147
10148 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10149         * src/pic/*
10150         tons of changes. Register allocation has been
10151         rewritten. Added customization for the various PICs. Flow
10152         analysis is restructured. ...
10153
10154         * src/pic/device.h:
10155         Added
10156
10157         * src/pic/device.c:
10158         Added. device.c is a PIC port hack to accomodate variations
10159         in PIC devices.
10160
10161 2002-03-13  Michael Hope  <michaelh AT vroom>
10162
10163         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10164
10165 2002-03-04  johanknol  <johanknol AT manik>
10166
10167         * /src/SDCCval.c: fixed
10168
10169         const unsigned char arr[][2] = { { 0, 1 } };
10170         t18.c:1: error: Initializer element is not constant
10171
10172 2002-03-04  bela  <bela AT manik>
10173
10174         * /device/include/mcs51reg.h:
10175         ds89c420 register definition update
10176
10177 2002-03-03    <johan AT FRIJA>
10178
10179         * support/Util/SDCCerr.c: did something, but don't no why anymore
10180
10181         * support/regression/tests/bug-524691.c: made it a little less shy
10182
10183         * src/SDCCast.c (decorateType): fixed bug #524697
10184
10185         * src/SDCCast.c: made some lineno improvements
10186
10187         * src/SDCCval.c (getNelements): changed warning to error
10188
10189         * src/SDCCglue.c (printIvalArray): changed warning to error
10190
10191         * src/SDCCicode.c: fixed a warning for mingw
10192
10193         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10194
10195         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10196
10197 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10198
10199         * src/ds390/peeph.def:
10200         Added some more peephole rules
10201
10202         * src/ds390/gen.c: Various fixes & enhancements
10203
10204         * src/SDCClrange.c, src/SDCClrange.h:
10205         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10206
10207         * src/ds390/ralloc.c:
10208         various fixes & enhancements (ds390) specific
10209
10210         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10211         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10212         from rallocs.
10213
10214         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10215
10216 2002-03-02    <johan AT FRIJA>
10217
10218         * src/SDCCast.c (decorateType): fixed bug #524708
10219
10220         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10221
10222         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10223
10224 2002-03-01  Michael Hope  <michaelh AT vroom>
10225
10226         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10227
10228         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10229
10230 2002-03-01    <johan AT FRIJA>
10231
10232         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10233
10234         * src/SDCCast.c (decorateType): fixed bug #524209
10235
10236         * src/SDCCval.c (valNot): fixed bug #524195
10237
10238 2002-02-26    <johan AT balder>
10239
10240         * src/xa51/gen.c: fixed a warning
10241
10242         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10243
10244         * src/SDCCast.c (decorateType): fixed bug #522534
10245
10246 2002-02-23    <johan AT balder>
10247
10248         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10249
10250 2002-02-22    <johan AT balder>
10251
10252         * src/SDCCast.c: fixed bug #514865
10253
10254         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10255
10256 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10257
10258         * sdcc/src/SDCCloop.c:
10259         Previous fix was not good. basic blocks that have "break" or "return" are
10260         not really partof a loop , but live ranges used in these blocks should
10261         be live thru the entire loop, so set partOfLoop but don't add them to
10262         loop region
10263
10264 2002-02-21    <johan AT FRIJA>
10265
10266         * src/SDCCcse.c: fixed bug #514308
10267
10268 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10269
10270         * src/SDCCloop.c:
10271         Fixed BUG #519583. If a conditional block ended in a return/break
10272         statement inside a loop, it was not being considered part of the loop.
10273
10274         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10275
10276 2002-02-10  Karl Bongers <karl AT turbobit.com>
10277
10278         * debugger/*:
10279         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10280         with lots of comments and notes.
10281
10282         * device/examples/test2.c:
10283         Fix bug, "red" variable not being initialized(compiler complained).
10284
10285         * device/examples/Makefile, examples/test3.c:
10286         Add Makefile in device/examples folder, compiles test3.c
10287         for use as a multiple module SDCDB test case.
10288
10289         * sim/ucsim/cmd.src/cmdset.cc:
10290         Took out debug printfs in ucsim "next" command.
10291
10292         * sim/ucsim/xa.src:
10293         Karl and Johan start ucsim XA support.  Most dissassembly working,
10294         about 75% emulation done(plenty of work remaining).
10295
10296         * sim/ucsim/z80.src:
10297         Add Z80 support to ucsim, add test-ucz80 regression test,
10298         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10299         Notice z80 compiler fails on examples/test3.c/crc code.
10300
10301 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10302
10303         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10304         Added support for --parms-in-bank1
10305
10306         * src/ds390/peeph.def:
10307         added a few more peephole optimzations
10308
10309         * src/ds390/main.c:
10310         1) added __builtin_inp & __builtin_outp used to read in data of given length
10311            from a memory mapped port
10312         2) added __builtin_memcmp
10313         3) added __builtin_swapw swap bytes of a short
10314
10315         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10316         1) handle multiple send & receives from register bank1
10317         2) ralloc can now allocate DPTR1 to some liveRanges
10318
10319         * src/SDCCsymt.c, src/SDCCsymt.h:
10320         changes to handle multiple sends & receives
10321
10322         * src/SDCCptropt.h:
10323         added some pointer arithmetic optimization
10324
10325         * src/SDCCptropt.c:
10326         added some pointer arithmetic optimizations but not stable yet so not
10327         called from anywhere (will get this working shortly)
10328
10329         * src/SDCCopt.c: fixed for multiple sends & receives
10330
10331         * src/SDCCmain.c:
10332         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10333         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10334            set preprocessor defines (depending on options)
10335
10336         * src/SDCCicode.c, src/SDCCicode.h:
10337         changes made to handle multiple sends & receives
10338
10339         * src/SDCCglobl.h:
10340         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10341
10342         * src/SDCCcse.c, src/SDCCcse.h:
10343         added function findbackward def (to be used in upcoming optimization)
10344
10345         * src/SDCCcflow.c, src/SDCCcflow.h:
10346         added function returnAtEnd - to determine if a basic block terminates with
10347         a RETURN iCode
10348
10349         * src/SDCCast.c, src/SDCCast.h:
10350         added option parms-in-bank1
10351
10352         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10353         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10354         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10355         adjusted for --parms-in-bank1 option
10356
10357         * device/include/string.h:
10358         donot redefine "reentrant" keyword
10359
10360         * device/include/ds80c390.h: Added some more SFRs
10361
10362 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10363
10364         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10365
10366 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10367
10368         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10369
10370 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10371
10372         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10373
10374 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10375
10376         * Added --xram-movc option
10377
10378 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10379
10380         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10381
10382 2002-01-11  Johan Knol
10383
10384         * Added math lib of Jesus Calvino-Fraga
10385
10386 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10387
10388         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10389         * support/regression/Makefile: new target test-mcs51-stack-auto
10390         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10391
10392 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10393
10394         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10395
10396 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10397
10398         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10399
10400 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10401
10402         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10403
10404         * src/SDCCglue.h: add definition for printIvalChar()
10405
10406 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10407
10408         * src/SDCCast.c: fix #498138 by Johan
10409
10410         * src/SDCCglue.c: fix #498138 by Johan
10411
10412 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10413
10414         * support/regression/Makefile: fix clean
10415
10416         * support/regression/ports/ds390/support.c: fix transmission of last character
10417
10418 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10419
10420         * /sdcc/src/ds390/gen.c:
10421         a) improved computing address of stack variable
10422         b) took out some #if 0 code
10423         c) improved parmBytes adjustment
10424         d) improved genPlusIncr & genMinusIncr
10425         e) genCmp could generate bad code (when left assigned to DPTR)
10426         f) Fixed bug in hasInc
10427
10428         * /sdcc/src/ds390/ralloc.c:
10429         a) packRegsForSupport could mess up live information (Fixed)
10430         b) packRegsDPTRuse could be incorrect for left & right shift
10431
10432         * /sdcc/src/mcs51/ralloc.c:
10433         packRegsForSupport could mess up the live information (Fixed)
10434
10435         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10436
10437         * /sdcc/src/SDCCast.c:
10438         can reverse a loop even if function call is present as long
10439         as the loop control variable is local & is not passed as parameter
10440
10441 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10442
10443         * /sdcc/ChangeLog: *** empty log message ***
10444
10445         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10446         More builtin function additions for TININative
10447
10448         * /sdcc/src/ds390/ralloc.c:
10449         Had broken the regression testsuite
10450
10451         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10452
10453         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10454         Added funcattr hasStackParms will be set for reentrant functions when there
10455         are paramteres on the stack, this helps in minimizing frame pointer generation
10456         typeFromStr can handle function pointers now
10457
10458         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10459         *** empty log message ***
10460
10461 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10462
10463         * /src/ds390/gen.c, /src/ds390/main.c:
10464         More builtin function additions for TININative
10465
10466         * /src/ds390/ralloc.c:
10467         Had broken the regression testsuite
10468
10469         * /src/SDCCast.c: Fixed a bug in dumptree
10470
10471         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10472         Added funcattr hasStackParms will be set for reentrant functions when there
10473         are paramteres on the stack, this helps in minimizing frame pointer generation
10474         typeFromStr can handle function pointers now
10475
10476         * /doc/builtins.txt, /doc/TININative.txt:
10477         *** empty log message ***
10478
10479
10480 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10481
10482         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10483         ALPHA version for -mTININative
10484
10485         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10486         updated to reflect changes in the port structure
10487
10488         * /src/port.h:
10489         added function do_assemble (similar to do_link) if non-null this function
10490         will be called to do assembly (-mTININative) requires a multi command
10491         assembly
10492         added function genAssemblerEnd will be called to generate assembler Epilogue
10493
10494         * /src/SDCCsymt.c:
10495         added _JavaNative to debug info printing
10496
10497         * /src/SDCCmain.c: added option --tini-libid
10498         added port->do_assemble function (-mTININative) has a multi command assemble
10499
10500         * /src/SDCCglue.c: Disabled "constExpr" check
10501         added port->genAssemblerEnd function
10502
10503         * /src/SDCCglobl.h: Added option --tini-libid value
10504
10505         * /src/SDCCast.h:
10506         tookout optimizeCompare from the header (has no external references)
10507
10508         * /src/SDCCast.c: made one more function "static"
10509
10510 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10511
10512         * src/z80/mappings.i: Added z80asm support.
10513
10514         * src/z80/main.c: Added z80asm support on --asm=z80asm
10515
10516         * src/z80/gen.c: Fixed asm portability issues.
10517
10518         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10519
10520         * src/SDCCglue.c (printExterns): Added global/extern split.
10521
10522 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10523
10524         * support/regression/Makefile: added test for mcs51 model large
10525
10526         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10527
10528         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10529
10530 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10531
10532         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10533
10534 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10535
10536         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10537
10538         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10539
10540 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10541
10542         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10543
10544         * support/regression/tests/simplefloat.c: Port to mcs51.
10545
10546 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10547         * support/regression/tests/bug-485362.c: Added.
10548
10549         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10550
10551         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10552
10553         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10554
10555         * src/z80/gen.c (aopDump): Added a dump function.
10556
10557 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10558         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10559
10560         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10561
10562         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10563
10564         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10565
10566         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10567
10568         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10569
10570         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10571
10572         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10573
10574         * support/regression/ports/ds390/support.c: Use tinibios.
10575
10576         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10577
10578 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10579
10580         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10581         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10582
10583         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10584
10585         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10586
10587 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10588
10589         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10590
10591         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10592         (packRegsForIYUse): Created and optimised.
10593
10594 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10595
10596         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10597 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10598
10599         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10600
10601         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10602
10603         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10604
10605 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10606
10607         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10608
10609         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10610
10611 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10612
10613         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10614
10615         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10616
10617         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10618
10619 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10620
10621         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10622         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10623         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10624
10625         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10626
10627         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10628         (genNotFloat): Added.
10629         (genUminusFloat): Added.
10630
10631         * device/lib/z80/Makefile: Added floating pt stubs.
10632
10633         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10634
10635         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10636
10637         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10638
10639 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10640
10641         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10642
10643         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10644
10645         * sdcc/support/regression/Makefile: Add port ds390.
10646
10647         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10648
10649         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10650
10651         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10652
10653         * sdcc/support/regression/ports/ds390/support.c: Added.
10654
10655         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10656
10657         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10658
10659         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10660
10661 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10662
10663         * device/include/malloc.h: Added z80 and gbz80 support.
10664
10665         * device/lib/gbz80/heap.s: Added.
10666
10667         * device/lib/z80/heap.s: Added.
10668
10669         * device/lib/malloc.c: Added z80 and gbz80 support.
10670
10671         * support/regression/tests/malloc.c (testMalloc): Added.
10672
10673         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10674
10675         * support/regression/tests/bug-478094.c: Added.
10676
10677         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10678
10679 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10680
10681         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10682
10683         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10684
10685         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10686
10687         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10688
10689         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10690
10691 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10692
10693         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10694
10695 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10696
10697         * support/regression/tests/bug-477927.c: Added.
10698
10699         * src/z80/peeph.def: Added minor rules.
10700
10701         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10702
10703         * src/z80/peeph.def: Added jump optimisation modification.
10704
10705 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10706
10707         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10708
10709 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10710
10711         * support/regression/tests/funptrs.c: Added.
10712
10713 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10714
10715         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10716
10717 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10718
10719         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10720
10721         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10722
10723         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10724         (movLeft2ResultLong): Created.
10725
10726         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10727         (joinPushes): Added.  Joins two char pushes into a word push.
10728
10729 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10730
10731         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10732
10733         * support/makebin/Makefile (install): Added creation of dest dir.
10734
10735 2001-10-24 Karl Bongers <karl AT turbobit.com>
10736
10737         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10738
10739 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10740
10741         * src/z80/ralloc.c: Turned off faulty pack for one use.
10742
10743         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10744
10745         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10746
10747 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10748
10749         * support/regression/Makefile: Improved clean
10750
10751         * support/regression/ports/gbz80/spec.mk: Added clean
10752
10753         * support/regression/ports/host/spec.mk: Added clean
10754
10755         * support/regression/ports/z80/spec.mk: Added clean
10756
10757         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10758
10759         * support/regression/ports/mcs51/timeout.c: little improvements
10760
10761 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10762
10763         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10764
10765         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10766
10767         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10768
10769 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10770
10771         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10772
10773         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10774
10775 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10776         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10777
10778         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10779
10780         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10781
10782         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10783
10784         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10785
10786         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10787
10788         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10789
10790         * support/regression/tests/longor.c: Added.
10791
10792 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10793
10794         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10795
10796         * as/mcs51/aslink.h: define PATH_MAX
10797
10798         * as/mcs51/asm.h: define PATH_MAX
10799
10800         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10801
10802         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10803
10804         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10805
10806         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10807
10808         * src/SDCCglobl.h: define PATH_MAX
10809
10810         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10811
10812         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10813
10814 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10815
10816         * src/z80/gen.c (gencjneshort): Fixed
10817
10818         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10819
10820 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10821
10822         * support/regression/tests/bug-469671.c: Added.
10823
10824         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10825
10826 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10827
10828         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10829
10830         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10831
10832 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10833
10834         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10835
10836         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10837
10838         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10839
10840         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10841
10842         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10843
10844         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10845
10846         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10847
10848 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10849
10850         * 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.
10851
10852         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10853
10854         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10855
10856 2001-10-07    <johan AT FRIJA>
10857
10858         * device/lib/gets.c (gets): fixed the return value.
10859
10860 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10861         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10862
10863         * 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.
10864
10865         * 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.
10866
10867         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10868
10869         * src/pic/gen.c: Removed Safe_strdup.
10870
10871         * configure.in: Added option to enable libgc support.
10872
10873         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10874         (bitVectUnion): Optimised.
10875         (bitVectIntersect): Optimised.
10876         (bitVectBitsInCommon): Optimised.
10877         (bitVectCplAnd): Optimised.
10878
10879         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10880
10881 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10882
10883         * src/SDCCmain.c: distinguish between assembler debug and plain options
10884
10885         * src/avr/main.c:   remove standard assembler options
10886
10887         * src/ds390/main.c: remove standard assembler options
10888
10889         * src/mcs51/main.c: remove standard assembler options
10890
10891         * src/port.h: removed "PENDING" comment
10892
10893 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10894
10895         * src/device/lib/_mulint.c  : new, with assember functions
10896
10897         * src/device/lib/_mullong.c : new, with assember functions
10898
10899         * src/device/lib/_divuint.c : with assember functions
10900
10901         * src/device/lib/_divsint.c : with assember functions
10902
10903         * src/device/lib/_divulong.c: with assember functions
10904
10905         * src/device/lib/_divslong.c: with assember functions
10906
10907         * src/device/lib/_moduint.c : with assember functions
10908
10909         * src/device/lib/_modsint.c : with assember functions
10910
10911         * src/device/lib/_modulong.c: with assember functions
10912
10913         * src/device/lib/_modslong.c: with assember functions
10914
10915         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10916
10917         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10918
10919         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10920                                       replaced _mululong.c and _mulslong.c by _mullong.c
10921
10922 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10923
10924         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10925
10926 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10927
10928         * src/SDCCglue.c: test, if win32api is available for MINGW
10929
10930 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10931
10932         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10933         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10934         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10935         * support/regression/ports/host/spec.mk: removed GENERIC
10936         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10937         * support/regression/ports/z80/spec.mk: removed GENERIC
10938
10939 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10940
10941         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10942
10943         * support/regression/tests/bug-467035.c: Created.
10944
10945 2001-10-01    <johan AT FRIJA>
10946
10947         * src/SDCC.y: fixed bug #466586 part 1
10948
10949 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10950
10951         * SDCCicode.c: z80 has no generic pointers
10952         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10953
10954 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10955
10956         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10957
10958 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10959
10960         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10961
10962         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10963
10964 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10965
10966         * configure.in: Fixed up so that ucsim is only configured once.
10967
10968         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10969
10970         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10971         (getPathDifference): As above.
10972
10973         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10974
10975         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10976
10977 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10978         * .version: Updated to 2.3.1
10979
10980         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10981         Added copyright header.
10982
10983         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10984         (assemble): Added support for macro based assembler commands.
10985         (linkEdit): Added support for macro based linker commands.
10986         (preProcess): Changed the pre-processor to use macros.
10987         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10988         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10989
10990         * device/lib/z80/crt0.s: Added module name for debugging.
10991
10992 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10993
10994         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10995
10996         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10997
10998         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10999
11000         * src/Makefile.in: Added SDCCmacro and SDCCutil
11001
11002 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
11003
11004         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
11005
11006 2001-09-16    <johan AT FRIJA>
11007
11008         * 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.
11009
11010 2001-09-15    <johan AT FRIJA>
11011
11012         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
11013         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
11014
11015 2001-09-11    <johan AT FRIJA>
11016
11017         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
11018
11019 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
11020
11021         * support/regression/tests/bug-460444.c: Added test case.
11022
11023         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
11024         (genCast): Added justification for all of the asserts.
11025
11026 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
11027
11028         * support/regression/support.c: _xdata replaced by xdata
11029
11030         * support/regression/spec.mk: removed _generic
11031
11032 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
11033
11034         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
11035
11036         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
11037         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
11038
11039         * src/z80/peeph.def: Added a rule to optimise shift then compare.
11040
11041         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
11042
11043         * support/regression/tests/bug-460010.c: Added test case.
11044
11045         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
11046
11047 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
11048
11049         * support/regression/Makefile: inter-port-clean adjusted for mcs51
11050
11051         * support/regression/testfwk.c: removed workaround for bug #436344
11052
11053         * support/regression/tests/bp.c: use less memory with mcs51
11054
11055         * support/regression/tests/bug-441448.c: use less memory
11056
11057         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
11058
11059         * support/regression/collate-results.py: typo
11060
11061 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
11062
11063         * support/regression/tests/fetchoverlap.c: Added new test case.
11064
11065         * support/regression/tests/bp.c: Added new test case.
11066
11067         * support/regression/tests/bug-448984.c: Added new test case.
11068
11069         * support/regression/tests/pow2shifts.c: Added new test case.
11070
11071         * src/z80/gen.c: Turned off the noise it normally generates for the release.
11072         (genlshTwo): Fixed right shift for count > 8.
11073
11074         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
11075
11076 2001-09-08    <johan AT FRIJA>
11077
11078         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
11079
11080 2001-09-07    <johan AT FRIJA>
11081
11082         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
11083
11084         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
11085
11086 2001-09-06    <johan AT FRIJA>
11087
11088         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
11089         * bernhard noted me at this: "() equals to (void)" (1.38)
11090
11091 2001-09-05    <johan AT FRIJA>
11092
11093         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
11094
11095 2001-09-04    <johan AT FRIJA>
11096
11097         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
11098
11099
11100 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
11101
11102         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
11103
11104 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
11105
11106         * link/z80/aslink.h: Fixed path for PATH_MAX
11107
11108 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11109
11110         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11111
11112         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11113
11114         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11115
11116         * 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.
11117
11118 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11119
11120         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11121         (genCmp): Fixed up genCmp for the GB with longs.
11122
11123         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11124
11125         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11126
11127         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11128
11129         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11130
11131 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11132
11133         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11134
11135 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11136
11137         * 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.
11138
11139         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11140
11141 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11142
11143         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11144
11145         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11146
11147 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11148
11149   * sim/ucsim/configure:    little improvement of Cygwin-detection
11150   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11151   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11152   * support/regression/tests/bug-221100.c: small changes for mcs51
11153   * support/regression/tests/bug-221168.c: small changes for mcs51
11154   * support/regression/tests/bug-227710.c: small changes for mcs51
11155   * support/regression/tests/staticinit.c: small changes for mcs51
11156   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11157   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11158   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11159
11160 $Revision$
11161