692ef83a4b53069c4f8ae2432c3611710ea85358
[fw/sdcc] / ChangeLog
1 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
2
3         * as/asx8051.dsp: added mcs51/strcmpi.h
4         * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
5         * as/hc08/aslink.h: updated lnksect prototype
6         * as/hc08/asm.h,
7         * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
8         * as/hc08/asmain.c,
9         * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
10           (newdot): handle A_ABS
11         * as/hc08/asout.c,
12         * as/mcs51/asout.c (outarea): output address
13         * as/hc08/lkaomf51.c,
14         * as/mcs51/lkaomf51.c: disabled unused array UsageType
15         * as/hc08/m08pst.c,
16         * as/mcs51/i51pst.c,
17         * as/z80/z80pst.c: "ABS" is not A_OVR
18         * as/hc08/lkarea.c (newarea): read a_addr,
19           (lnkarea): added codemap array, sort absolute areas to the front,
20            combine all GSINITx/GSFINAL,
21           (find_empty_space, allocate_space): new functions,
22           (lnksect): return next address, handle absolute sections
23         * as/mcs51/lkarea.c (newarea): read a_addr,
24           lnksect2 prototype changed,
25           (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
26           (find_empty_space, allocate_space): new, factored out of lnksect2,
27           (lnksect2): return next address, handle absolute sections
28         * as/hc08/lkhead.c,
29         * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
30         * as/hc08/lklibr.c (addfile, fndsym),
31         * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
32           index out of range and detect both '\' and '/'
33         * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
34         * device/include/stdbool.h: removed SDCC_ds390 from check to pass
35           regression tests (ds390 cannot return bool yet)
36         * doc/sdccman.lyx: changed version number, document changed --no-peep,
37           document critical interrupts on z80, document changed SDCC define
38         * src/asm.c (_asxxxx_mapping): fixed .org directive,
39           (_a390_mapping): added .org directive
40         * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
41           (genMultOneByte): fixed warnings
42         * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
43           ones
44         * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
45         * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
46           (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
47         * src/pic16/gen.h: changed prototype for pic16_popGetLabel
48         * src/pic16/main.c: removed newReg prototype
49         * src/pic16/pcode.c,
50         * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
51           warnings
52         * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
53           ones
54         * src/pic16/ralloc.c
55         * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
56           to fix warnings
57         * src/pic/pcode.c (allocInternalRegister): changed parameter optype
58           from short to PIC_OPTYPE
59         * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
60         * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
61           optype from short to PIC_OPTYPE
62         * src/port.h: made int_size unsigned to fix warnings
63         * src/SDCC.y: fixed warning on MSVC
64         * src/SDCCicode.c (getArraySizePtr): return unsigned int
65         * src/SDCCopt.c (convertToFcall): fixed warnings
66         * src/SDCCsymt.h: removed double prototype for genSymName
67         * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
68           offset int to fix warnings
69
70 2006-04-22 Borut Razem <borut.razem AT siol.net>
71
72         * doc/sdccman.lyx, */Makefile, */Makefile.in:
73           references to CVS replaced with Subversion
74
75 2006-04-21 Borut Razem <borut.razem AT siol.net>
76
77         * doc/sdccman.lyx, */Makefile, */Makefile.in:
78           references to CVS replaced with Subversion
79
80 2006-04-19 Borut Razem <borut.razem AT siol.net>
81
82         * src/version.awk: adapted for svn
83         * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
84           sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
85           sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
86           /binutils-avr/etc/*.vi, *.jin: removed all properties
87           support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
88
89 2006-04-19 Borut Razem <borut.razem AT siol.net>
90
91         * CVS to Subversion migration completed
92
93 2006-04-18 Borut Razem <borut.razem AT siol.net>
94
95         * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
96           ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
97
98 2006-04-17 Borut Razem <borut.razem AT siol.net>
99
100         * device/include/Makefile.in: added pic/*.inc to the installation
101
102 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
103
104         * support/regression/collate-results.py: fixed output in case of
105         a valdiag error
106         * support/regression/generate-cases.py: fixed splitting of pathnames
107         with dots
108         * as/hc08/lklibr.c (addfile),
109         * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
110
111 2006-04-11 Raphael Neider <rneider AT web.de>
112
113         * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
114         * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
115         * src/pic16/pcode.c (assignValnums): fixed #1460578
116
117 2006-04-11 Raphael Neider <rneider AT web.de>
118
119         * device/lib/pic/libdev/*.c,
120         * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
121           fixes #1468739, enables compilation in --std-c99 mode
122         * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
123
124 2006-04-11 Raphael Neider <rneider AT web.de>
125
126         * src/pic/device.c (find_device): removed debug output
127           (list_valid_pics): enabled verbose listing of supported devices
128         * device/include/stdbool.h: define bool as char for pic14/16 as well
129
130 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
131
132         * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
133
134 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
135
136         * .version: bumped version to 2.5.6
137         * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
138
139 2006-04-06 Raphael Neider <rneider AT web.de>
140
141         * .version: bumped version to 2.5.6 (pic14 ABI changed)
142         * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
143         * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
144           pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
145             pic14_constructAbsMap
146           (pic14printPublics): declare absolute global symbols as global
147           (pic14createInterruptVect),
148         * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
149           (newReg): assume new registers unused, use correct name in
150             hashtable (reg->name instead of name), more debugLog output
151         * src/pic/device.h (PIC_device): added fields for verbose output
152         * src/pic/device.c: moved device definition to pic14devices.txt,
153             added routines for runtime parsing of pic14devices.txt,
154             added support for second config word
155         * src/pic/main.c (_process_pragma): removed #pragma maxram,
156           (_pic14_keywords): no longer accept "bit" and "sbit" keywords
157           (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
158           (_pic14_parseOptions): moved pCodeInitRegisters here
159           (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
160         * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
161           (pCodeInitRegisters): rewrapped comments, perpared new approach to
162             handling the pseudo stack
163         * device/lib/Makefile.in: ignore failures in objects-pic16,
164         * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
165         * device/lib/pic/NEWS: document new dependency on picXXX.lib
166         * device/lib/pic/Makefile.subdir,
167         * device/lib/pic16/Makefile.subdir: improved clean rules
168         * device/lib/pic/libdev/: NEW, pic14 device libraries
169         * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
170         * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
171         * device/include/Makefile.in: create subdir and install pic14 headers
172         * device/include/pic/p16f_common.inc: removed unused declarations
173         * device/include/pic/pic16*.h: added header files for 100+ 14 bit
174             PICs from inc2h.pl v1.6,
175             replaced BIT_AT macros with struct declarations
176         * device/include/pic/pic14devices.txt: definition of supported devices,
177             all above improvements contributed by Zik Saleeba, thanks
178         * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
179         * support/scripts/sdcc.nsi: also install pic14 device libraries and
180             headers
181
182 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
183
184         * device/include/mcs51/c8051f410.h: added interrupt numbers,
185         * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
186           thanks to Charles Olds
187
188 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
189
190         * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
191
192 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
193
194         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
195         * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
196         * support/regression/bug1464657.c: added, new test
197
198 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
199
200         * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
201           version number
202
203 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
204
205         * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
206           --no-peep and --peep-file <file> are used don't use default rules but
207           do use the <file>
208
209 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
210
211         * src/mcs51/gen.c (genCall): fixed bug 1457608
212
213 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
214
215         * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
216         changes seem to cause (trigger?) problems with the build system.
217
218 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
219
220         * src/SDCCpeeph.c (operandsLiteral): new, added,
221           (callFuncByName): inserted operandsLiteral
222         * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
223
224 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
225
226         * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
227         * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
228
229 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
230
231         * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
232           implemented patch 1120823 Thanks to Willy De la Court (normal
233           interrupts need an interrupt number now if they are made critical),
234           and enabled nesting of critical functions though not for gbz80
235           (genCritical, genEndCritical): added functions
236           (genZ80Code): added cases for CRITICAL and ENDCRITICAL
237         * src/z80/mappings.i: added "ei" to all mappings
238
239 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
240
241         * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
242         submitted by the Debian SDCC maintainer Aurelien Jarno:
243         "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
244         archive with gcc 4.1 on mips and wrote the patch"
245
246 2006-03-16 Raphael Neider <rneider AT web.de>
247
248         * src/pic16/genarith.c (genAddLit): simplified and fixed case where
249           the left operand is shorter than the result (c* = lit-c* + int),
250           fixes bug #1450796
251         * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
252           OP_SYMBOL
253
254 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
255
256         * src/.version: increased version number to 2.5.5
257         * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
258         linking is done manually in pic16 port's _linkEdit,
259         * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
260         PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
261         * src/pic16/gen.c (aopForSym): when direct register name is WREG then
262         allocate asmop as AOP_ACC,
263         (aopForRemat): added parameter 'bool result' in function declaration,
264         (pic16_aopGet): return AOP_ACC when accessing WREG,
265         (pic16_popGetTempReg): minor modification,
266         (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
267         'pic16_allocWithIdx',
268         (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
269         calling function in absolute addresses,
270         (genAssign): take into account AOP_ACC asmop,
271         * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
272         * src/pic16/pcoderegs.c: some debug functions and lines added,
273         * src/pic16/ralloc.c (decodeRegType): added but commented out,
274         * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
275         register too,
276         * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
277         call to allocReg, not by manually allocating a new one,
278         (pic16_assignRegisters): now before going through the register
279         allocating functions mark all registers as free. This eliminates some
280         side effects resulting from peephole parser done earlier in the backbone
281
282 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
283
284         * src/SDCCicode.c (geniCodeLogic),
285         * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
286
287 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
288
289         * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
290           (genSend): bugfix, do not allocate and free twice,
291           (shiftRLong): handle partially overlapping aops
292         * support/regression/tests/bitopcse.c: fixed warning redefined idata
293
294 2006-03-08 Borut Razem <borut.razem AT siol.net>
295
296         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
297           for pic16
298
299 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
300
301         * support/regression/tests/bug1409955.c: new, added
302         * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
303         * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
304           (aopForSym, aopOp): increment asmop.allocated if reused,
305           (freeAsmop): decrement asmop.allocated and check for zero instead of
306           using asmop.freed,
307           (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
308           (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
309            genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
310            genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
311            genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
312            genSignedRightShift, genRightShift, genDataPointerGet,
313            genPagedPointerGet, genFarPointerGet, genCodePointerGet,
314            genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
315             in reverse order from allocation,
316           (genPlus, genCmpEq): free asmop's in reverse order from allocation and
317             added swappedLR to keep track
318         * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
319           pdata & code for GCC, z80, gbz80 & hc08
320         * support/regression/tests/zeropad.c: moved defines to testfwk.h
321
322 2006-03-08 Raphael Neider <rneider AT web.de>
323
324         * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
325
326 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
327
328         * device/include/mcs51/c8051f410.h: new SiLabs mcu
329         * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
330         * support/regression/tests/array.c: added parenthesis, made arrays unsigned
331
332 2006-03-06 Borut Razem <borut.razem AT siol.net>
333
334         * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
335           made the linker quiet
336
337 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
338
339         * src/pic16/gen.c (genPcall): fixed bug #1443644
340         * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
341         which dumps before the function entry point a data byte which represents
342         the number of the local variables used by the specified function, added
343         'xinst' for initial support for Extended Instruction Support,
344         * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
345         (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
346         port->fun_prefix anymore (may change later),
347         (genFunction, genEndFunction): do not store/restore local registers for
348         _main (this should take care the --main-return command line option in
349         the future),
350         (genOr): removed some legacy pic-port instructions,
351         * src/pic16/genarith.c (genAddLit): re-enabled old code because
352         performing operations with SFR's causes data to be written more than
353         once to each SFR. Perhaps SFRs should be handled in special cases...
354         * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
355         pcode.h
356         * src/pic16/main.c (_process_pragma): stack bound checking did not take
357         into account for stack starting position,
358         (struct OPTIONS pic16_optionsTable): added command line argument
359         --extended or -y for Extended Instruction Support,
360         * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
361         (deassignLRs): *** perhaps the most important change, old 'for' code
362         (commented out for reference), didn't account for some registers which
363         were left marked 'not free' after a pointer operation. The change
364         reduces register usage a lot in some cases
365
366 2006-03-04 Borut Razem <borut.razem AT siol.net>
367
368         * support/regression/ports/hc08/spec.mk: remove *.asm in traget
369           _clean
370         * support/regression/tests/bug-524697.c: decreased array size for
371           mcs51 to fit into the internal RAM
372         * support/regression/Makefile.in: a little bit more verbose
373
374 2006-03-03 Borut Razem <borut.razem AT siol.net>
375
376         * support/regression/fwk/lib/testfwk.c,
377           support/regression/fwk/include/testfwk.h: introduced function
378           _prints(), nonrecursive _printn(), call _initEmu() from main()
379         * support/regression/ports/gbz80/support.asm,
380           support/regression/ports/ucz80/support.asm,
381           support/regression/ports/z80/support.asm,
382           support/regression/ports/ds390/support.c,
383           support/regression/ports/hc08/support.c,
384           support/regression/ports/host/support.c,
385           support/regression/ports/mcs51/support.c,
386           support/regression/ports/xa51/support.c: added empty _initEmu()
387           function
388         * support/regression/ports/pic16/gpsim.cmd,
389           support/regression/ports/pic16/spec.mk,
390           support/regression/ports/pic16/support.c,
391           support/regression/Makefile.in: added pic16 regression test
392
393 2006-03-01 Raphael Neider <rneider AT web.de>
394
395         * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
396           genConstPointerGet): use safe way of generating MOVFF to cover
397             literals as well as registers, fixes bug #1440527
398         * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
399             dereference
400           (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
401             more correctly, fixes bug #1232186
402           (pic16_printIval): use pic16_printIvalUnion() for initialized unions
403         * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
404             gplink guess the correct processor in more cases, applied patch
405             from Till Riedel attached to and fixing bug #1436552
406
407 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
408
409         * support/regression/tests/array.c: added, contains check for #1434401
410         * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
411
412 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
413
414         * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
415         * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
416         * device/include/mcs51/c8051f326.h,
417         * device/include/mcs51/c8051f340.h: new SiLabs mcu's
418         * device/include/mcs51/c8051f000.h,
419         * device/include/mcs51/c8051f018.h,
420         * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
421           PCON_IDLE,PCON_STOP and added sfr16 definitions
422
423 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
424
425         * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
426           genGetWord): fixed bug 1409955
427
428 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
429
430         * device/include/hc08/mc68hc908gp32.h,
431         * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
432
433 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
434
435         * src/SDCCast.c (constExprValue): return NULL if not a value
436         * src/SDCCglue.c (printIvalArray): fixed bug 1225568
437         * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
438         * support/regression/tests/bitfields.c: enabled signed bitfield for all
439
440 2006-02-13 Borut Razem <borut.razem AT siol.net>
441
442         * src/regression/ptrarg.c: added, fails due to bug #1430967
443         * src/regression/Makefile: ptrarg.c added, ...
444
445 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
446
447         * src/z80/gen.c (genUnpackBits): fixed bug 1019480
448         * support/regression/tests/bitfields.c: enabled signed bitfield for z80
449
450 2006-02-11 Borut Razem <borut.razem AT siol.net>
451
452         * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
453           print "Processor: xxx" message to stdout only if --verbose
454
455 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
456
457         * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
458         * support/regression/tests/bug1426356.c: added
459         * support/regression/tests/bitfields.c: removed 2 tests
460
461 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
462
463         * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
464         * device/include/mcs51/c8051f330.h,
465         * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
466           PCON_IDLE,PCON_STOP and added sfr16 definitions
467         * device/lib/_divsint.c,
468         * device/lib/_divuint.c,
469         * device/lib/_divulong.c,
470         * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
471           register bank bug for small stackauto
472
473 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
474
475         * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
476
477 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
478
479         * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
480         * all.dsp: corrected several bin paths
481         * device/include/mcs51/c8051f120.h,
482         * device/include/mcs51/c8051f300.h,
483         * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
484           to PCON_IDLE,PCON_STOP
485         * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
486         * device/lib/printf_large.c (output_float): fixed bug 1388703
487         * support/regression/tests/bug1057979.c: added test for bug 1388703
488
489 2006-02-08 Raphael Neider <rneider AT web.de>
490
491         * src/pic/pcode.c (pciTRIS): fixed typo,
492           (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
493           (LinkFlow): fixed handling of flows that end in a call,
494           (ReuseReg): perform safety check earlier
495         * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
496             to work with flows at the beginning of a pBlock,
497             fixes #1426557 (Symbol not previously defined),
498           (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
499             usage information
500           (RemoveUnusedRegisters): update register usage info
501         * src/pic/ralloc.c (newReg): prevent duplicate registers from being
502             created, reuse existing ones instead
503         * src/pic/gen.c (genPcall): fixed #1424719
504
505 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
506
507         * link/z80/lkmain.c,
508         * link/z80/lklex.c,
509         * link/z80/lkdata.c,
510         * link/z80/aslink.h: fixed build on current cygwin:
511         replaced getline() by lk_getline()
512
513 2006-02-01 Borut Razem <borut.razem AT siol.net>
514
515         * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
516           src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
517           src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
518           src/regression/bool1.c, src/regression/bool2.c,
519           src/regression/bool3.c, src/regression/call1.c,
520           src/regression/compare.c, src/regression/compare10.c,
521           src/regression/compare2.c, src/regression/compare3.c,
522           src/regression/compare4.c, src/regression/compare5.c,
523           src/regression/compare6.c, src/regression/compare7.c,
524           src/regression/compare8.c, src/regression/compare9.c,
525           src/regression/configword.c, src/regression/for.c,
526           src/regression/inline.c, src/regression/mult1.c,
527           src/regression/nestfor.c, src/regression/or1.c,
528           src/regression/pointer1.c, src/regression/ptrfunc.c,
529           src/regression/rotate1.c, src/regression/rotate2.c,
530           src/regression/rotate3.c, src/regression/rotate4.c,
531           src/regression/rotate5.c, src/regression/rotate6.c,
532           src/regression/rotate7.c, src/regression/string1.c,
533           src/regression/struct1.c, src/regression/sub.c,
534           src/regression/sub2.c, src/regression/switch1.c,
535           src/regression/while.c, src/regression/xor.c,
536           src/regression/create_stc, src/regression/simulate,
537           src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
538           regression tests
539         * src/regression/gpsim_assert.h: added
540
541 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
542
543         * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
544         ((void (code *) (void)) 0) ();
545         * as/hc08/aslex.c,
546         * as/hc08/aslink.h,
547         * as/hc08/asm.h,
548         * as/hc08/asmain.c,
549         * as/hc08/lkdata.c,
550         * as/hc08/lklex.c,
551         * as/hc08/lkmain.c,
552         * as/mcs51/aslex.c,
553         * as/mcs51/aslink.h,
554         * as/mcs51/asm.h,
555         * as/mcs51/asmain.c,
556         * as/mcs51/lkdata.c,
557         * as/mcs51/lklex.c,
558         * as/mcs51/lkmain.c,
559         * as/z80/aslex.c,
560         * as/z80/asm.h,
561         * as/z80/asmain.c: fixed build on current cygwin:
562         replaced getline() by as_getline()
563
564 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
565
566         * src/SDCC.y: fixed bug #716242, exchanged pointer and function
567         declarator in the symbol chain
568         * src/SDCCsymt.h,
569         * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
570         parameter list for function pointers
571         * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
572         * support/regression/tests/bug-716242.c: added
573
574 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
575
576         * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
577         offset if possible
578         * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
579
580 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
581
582         * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
583         inifinitely recurseable, added static
584         * support/regression/tests/bug-1408066.c: added
585
586 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
587
588         * src/SDCCicode.h,
589         * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
590         renamed, added possibility to create "postLoopLbl"-labels
591         * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
592         newiTempLoopHeaderLabel
593         * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
594         isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
595         addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
596         hasNonPtrUse, loopInvariants, addressTaken, findInduction,
597         findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
598         (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
599         (basicInduction): fixed bug #136564, made static,
600         (loopInduction): changed parameter of basicInduction, made static,
601         (addPostLoopBlock): added
602         * src/SDCCloop.h: removed backEdges, pregion, pinduction,
603         loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
604         findLoopEndSeq
605         * support/regression/tests/bug-136564.c: added
606         * support/regression/ports/mcs51-xstack-auto/spec.mk: added
607         --std-sdcc99 to LIBSDCCFLAGS
608
609 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
610
611         * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
612         while loop
613         * support/regression/tests/bug-1406131.c: added
614
615 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
616
617         * src/SDCCast.c (decorateType): fix promotion of unary minus
618         * src/SDCCsymt.c (computeType): beautified
619         * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
620         (valUnaryPM, valComplement): fix sign and promotion,
621         (valNot): ANSI: result type is int (SDCC: unsigned char)
622         * support/regression/tests/uminus.c: speedup by removing superflous
623         test case 'int'
624         * support/regression/tests/onebyte.c: added promotion and signedness
625         tests for unary minus
626         * support/regressions/tests/bug-477927.c: disable warning about
627         uninitialized variables
628         * support/regression/tests/not.c: added
629
630 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
631
632         * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
633         * src/mcs51/gen.c (gen51Code): show final register usage after
634         fillGaps in asm with --i-code-in-asm
635         * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
636         markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
637         incUsed, rliveClear, adjustIChain): made static,
638         (setFromRange): excluded because it's unused,
639         (findPrevUseSym, markWholeLoop): added,
640         (findPrevUse): rewritten; fixes bug 895992; now a complete search
641         through all branches of predecessors enables sdcc to emit the warning
642         W_LOCAL_NOINIT, marking of outermost loop was incomplete,
643         (rlivePoint): made static, added parameter emitWarnings which is only
644         true during the first run out of two,
645         (findRecursiveSucc, findRecursivePred): removed,
646         (computeLiveRanges): made static, added parameter emitWarnings,
647         (dumpIcRlive): added for debugging only
648         * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
649         removed prototype of setFromRange()
650         * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
651         in call of computeLiveRanges()
652         * support/regression/tests/bug-895992.c: added
653         * support/regression/tests/bug-971834.c: added
654         * support/valdiag/tests/bug-895992.c: added
655         * support/valdiag/tests/bug-971834.c: added
656
657 2005-12-18 Raphael Neider <rneider AT web.de>
658
659         * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
660           (genUnpackBits): improved code for direct operands,
661           (genPackBits): improved code for literal assignment to bitfields
662             and for direct destination operands (no FSR indirection),
663             prevented redundant AND, fixes #1362800,
664           (AccLsh): added parameter to disable masking of the result
665         * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
666           skip instructions with side-effects (like incfsz),
667           (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
668         * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
669         * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
670           fixes #1375263
671
672 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
673
674         * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
675         volatile variables as spill location
676
677 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
678
679         * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
680         replacing literals
681         * support/regression/tests/bug-1376320.c: added
682
683 2005-12-08 Raphael Neider <rneider AT web.de>
684
685         * src/pic/device.c: renamed is_shared to pic14_is_shared
686         * src/pic/gen.c (genIfx): re-enabled handling of sbits
687         * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
688           (is_valid_identifier): added for above workaround
689
690 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
691
692         * device/lib/Makefile.in: fixed to enable port-specific-objects
693         * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
694           char, thanks Hubert Sack
695         * doc/sdccman.lyx: documented --xstack-loc,
696           elaborated a bit more on interrupts and pitfalls,
697           removed "setjmp/longjmp unsupported",
698           documented some unsupported C99 features
699         * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
700         * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
701           if, thanks Hubert Sack
702         * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
703         * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
704           make make_library
705         * support/regression/get_ticks.py: new, get cpu cycles and code size, so
706           regression tests can report resource usage (rfe 700441)
707         * support/regression/collate-results.py: report resource usage
708         * support/regression/ports/ds390/spec.mk,
709         * support/regression/ports/hc08/spec.mk,
710         * support/regression/ports/mcs51/spec.mk,
711         * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
712         * support/regression/ports/ds390/uCsim.cmd,
713         * support/regression/ports/hc08/uCsim.cmd,
714         * support/regression/ports/mcs51/uCsim.cmd,
715         * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
716         * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
717           library, use the default one
718         * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
719           building the library
720
721 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
722
723         * config.dsp: added dependency on .version and configure_vc.awk
724         * device/include/setjmp.h: updated for --stack-auto and --xstack
725         * device/include/mcs51/at89c51snd1c.h: corrected line endings
726         * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
727         * device/lib/_setjmp.c: updated for --stack-auto and --xstack
728         * device/lib/libsdcc.lib: added _setjmp
729         * src/SDCCast.c (createIvalCharPtr): fixed warnings,
730           (decorateType): fixed bug 1372851,
731           (optimizeGetHbit): fixed warning
732         * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
733           array initialisation
734         * support/regression/tests/bug1057979.c: added test for bug 1358192
735         * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
736
737 2005-12-03 Borut Razem <borut.razem AT siol.net>
738
739         * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
740           command since the NSIS was upgraded to version 2.11 on CF x86-linux2
741
742 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
743
744         * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
745         createIval): implement symbol independant "flexible array member",
746         (createIvalCharPtr): implemented flexible array initialisation with a
747         string
748         * src/SDCCsymt.c (copyStruct): removed,
749         (getSize): fixed misleading comment,
750         (getAllocSize): removed, the additional allocation size is now in
751         sym->flexArrayLength,
752         (checkStructFlexArray): new, syntax checks for flexible array members,
753         (compStructSize): added syntax checks for "flexible array members"
754         (copyStruct): removed,
755         (copyLinkChain): removed inefficient fix for bug 770487
756         * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
757         * src/SDCCsymt.h: added structdef.b_flexArrayMember and
758         symbol->flexArrayLength
759         * src/SDCCerr.c,
760         * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
761         E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
762         * support/regression/tests/structflexarray.c: added
763         * support/valdiag/tests/structflexiblearray.c: added
764
765 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
766
767         * src/SDCCast.c (decorateType): fixed bug 1368489
768         * support/Util/SDCCerr.c,
769         * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
770
771 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
772
773         * device/include/mcs51/at89c51snd1c.h: added file submitted by
774           Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
775
776 2005-11-27 Borut Razem <borut.razem AT siol.net>
777
778         * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
779           support/cpp2/mkdeps.h: added command line option
780           -obj-ext=<extension> to SDCPP to define object file externion, used
781           for generation of make dependencies (-M)
782         * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
783
784 2005-11-26 Borut Razem <borut.razem AT siol.net>
785
786         * support/scripts/sdcc.nsi: added small-stack-auto libraries,
787           added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
788           added pic and pic16 libraries
789
790 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
791
792         * device/include/float.h: Corrected typo in prototype of __fsgt
793
794 2005-11-25 Borut Razem <borut.razem AT siol.net>
795
796         * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
797           added creation of model-mcs51-stack-auto libraries
798
799 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
800
801         * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
802         and fields-list too
803         * src/SDCCast.c (createIvalArray): removed obsolete comment
804
805 2005-11-24 Borut Razem <borut.razem AT siol.net>
806
807         * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
808           added missing device/lib/mcs51/crt*.asm sources
809
810 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
811
812         * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
813
814 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
815
816         * device/lib/_fs2schar.c,
817         * device/lib/_fs2sint.c,
818         * device/lib/_fs2slong.c: optimized inline asm
819
820 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
821
822         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
823           Better handling of floats between -1.0 and 0.0.
824
825 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
826
827         * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
828           (the missing "if"s prohibited removal of redundant labels)
829
830 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
831
832         * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
833           Properly convert floats between -1.0 and 0.0 to long, int, and char
834           types (max integer value of negative floats tends to zero).
835         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
836           Removed changes made so to work properly with floats between
837           -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
838           and _fs2char.c
839
840 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
841
842         * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
843         * src/mcs51/gen.c (genUnpackBits): better code and a fix,
844         (genCast) cosmetic change
845         * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
846         * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
847         from mcs51
848         * support/regression/tests/bitfields (testSignedBitfields): added
849
850 2005-11-18 Borut Razem <borut.razem AT siol.net>
851
852         * sdcc/device/lib/Makefile.in: remove all unnecessary files
853         * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
854           introduced SILENT option to make building of pic16 libraries less
855
856 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
857
858         * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
859           Now they work properly with floats between -1.0 and 0.0
860         * device/lib/printf_large.c: Removed temporary patch for bug 1358192
861
862 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
863
864         * src/SDCCicode.c (printOperand): added missing else
865
866 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
867
868         * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
869         reformatted for better readability
870         * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
871         signed bitfields
872
873 2005-11-17 Borut Razem <borut.razem AT siol.net>
874
875         * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
876           introduced SILENT option to make building of pic16 libraries less
877           verbose - used for nightly snapshot build
878         * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
879           available on Win32 platforms.
880         * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
881           medium, large, pic and pic16
882
883 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
884
885         * device/lib/printf_large.c: Temporary patch for bug 1358192:
886           printf("%f"...) sets fraction to zero.
887
888 2005-11-16 Raphael Neider <rneider AT web.de>
889
890         * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
891           fixes #1357221
892         * src/pic/gen.c (genIfx): implemented for CARRY bit
893         * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
894           to generic pointers, fixes #1357332,
895           (pic16_movLit2f): NEW,
896           (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
897
898 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
899
900         * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
901
902 2005-11-11 Raphael Neider <rneider AT web.de>
903
904         * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
905         * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
906           compute pointer's type from operand,
907           (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
908           improved single bit reads, fixes bug #1353379
909
910 2005-11-09 Borut Razem <borut.razem AT siol.net>
911
912         * support/scripts/sdcc.nsi: added lib/pic to the package
913
914 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
915
916         * src/SDCCval.c (valUnaryPM): fixed bug 1350699
917
918 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
919
920         * support/regression/tests/bug1348008.c: added
921         * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
922         * support/regression/tests/bug1337835.c: updated comment
923
924 2005-11-06 Borut Razem <borut.razem AT siol.net>
925
926         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
927           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
928           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
929           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
930           sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
931           dynamic construction of cl_error_class and derivates - 2.nd try
932
933 2005-11-05 Borut Razem <borut.razem AT siol.net>
934
935         * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
936           bug, which caused Bus Errors on sparc solaris
937
938 2005-11-04 Borut Razem <borut.razem AT siol.net>
939
940         * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
941           sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
942           sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
943           sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
944           sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
945           and derivates to resolve the initialization problem on OSX
946
947 2005-11-02 Borut Razem <borut.razem AT siol.net>
948
949         * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
950           corrected typo - #include <winsock2.h>
951
952 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
953
954         * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
955           (_asxxxx_mapping): added org directive for future enhancements
956
957 2005-11-01 Borut Razem <borut.razem AT siol.net>
958
959         * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
960           enabled sockets on WIN32
961         * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
962
963 2005-10-31 Borut Razem <borut.razem AT siol.net>
964
965         * support/regression/generate-cases.py: escape backslashes in {testcase}:
966           WIN32 backslash path delimiters should be escaped when used in C strings
967         * support/regression/tests/bitfields.c: exclude failing assertions for
968           __CYGWIN32__ and __MINGW32__ hosts
969
970 2005-10-30 Borut Razem <borut.razem AT siol.net>
971
972         * src/SDCCutil.c: corrected double comparison typo
973
974 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
975
976         * device/lib/medium/Makefile: added for new memory model medium
977         * device/include/asm/mcs51/features.h: updated for medium/pdata
978         * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
979           added Multiply & Accumulate sbit's and MAC0_PAGE define
980         * device/include/mcs51/c8051f300.h: added sfr16 definitions
981         * device/include/mcs51/c8051f310.h: added sfr16 definitions
982         * device/lib/_mullong.c: update for medium model
983         * device/lib/incl.mk: added medium model
984         * doc/sdccman.lyx: documented medium model
985         * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
986         * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
987         * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
988         * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
989           (allocParms): set SCLS and OCLS to pdata for medium model
990         * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
991           for pdata,
992           (powof2): return <0 if not power of 2
993         * src/avr/gen.c (genBitWise): use updated powof2
994         * src/mcs51/gen.c (genMinusDec): use acc if necessary,
995           (shiftR2Left2Result): small optimization in setup, save acc when storing,
996           (shiftLLeftOrResult): use B if necessary
997         * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
998         * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
999         * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1000         * support/regression/Makefile.in: added test-mcs51-medium
1001         * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1002
1003 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1004
1005         * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1006         specifier unsigned
1007         * device/lib/time.c (mktime): fixed bug 1334315
1008
1009 2005-10-28 Raphael Neider <rneider AT web.de>
1010
1011         * device/include/pic/p16f_common.inc: added common declarations
1012         * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1013
1014 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1015
1016         * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1017           (aopPutUsesAcc): added to predict accumulator use,
1018           (assignResultValue): save acc if necessary,
1019           (genMinusDec): store result if indirectly addressed,
1020           (genDivOneByte):  save acc if necessary,
1021           (movLeft2Result): bugfix if left already in acc,
1022           (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1023             attention to accumulator use (esp. pdata),
1024           (genReceive): receive pdata correctly
1025         * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1026         * src/SDCCicode.h: added isOperandInPagedSpace prototype
1027
1028 2005-10-27 Raphael Neider <rneider AT web.de>
1029
1030         * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1031
1032 2005-10-27 Raphael Neider <rneider AT web.de>
1033
1034         * .version: changed version to 2.5.4
1035         * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1036         * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1037           (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1038             arithmetics support routines
1039         * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1040         * device/lib/Makefile.in: also create installdir for pic
1041
1042         * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1043           pic14 port as well
1044         * src/pic/device.c (dump_sfr): rewritten to delegate register
1045           placement to the linker (use `extern sym' rather than sym EQU addr),
1046           (validAddress): fixed to check last specified address
1047         * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1048           (popGetLit): truncate literal value to 8 bit,
1049           (popGet): moved assert to more appropriate place
1050           (popGetExternal): create pCode operand from and mark the according
1051             symbol as being `extern'
1052           (popGetAddr): added sanity check on immediate's offset, provide
1053             GPOINTER tag on demand
1054           (aopPut): fixed for immediates,
1055           (mov2w_op): move operand's address or contents to WREG (depending on
1056             operand type), safer variant of mov2w,
1057           (movwf,call_libraryfunc): NEW, handy abbreviations,
1058           (get_argument_pcop,get_return_val_pcop,pass_argument,
1059           get_returnvalue): interface for accessing function parameters and
1060             return values,
1061           (assignResultValuei,genRet): use new parameter/return value interface
1062           (pic14_getDataSize): back to old version handling generic pointers,
1063           (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1064             provided implementation and/or fixed old one,
1065           (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1066             calls, removed legacy 8051 reference code
1067           (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1068           (loadSignToC): NEW, move the operands sign bit to CARRY,
1069           (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1070             genRightShiftSigned, accepts negative shift counts,
1071           (setup_fsr): load FSR and adjust IRP (indirect memory access),
1072           (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1073             generic pointers, __data pointers and __code pointers,
1074           (genUnpackBits,genPackBits): rewritten to work with generic pointers
1075             and signed bitfields, limit bitfields to 8 bit,
1076           (genDataPointerGet): fixed number of bytes read,
1077           (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1078           (genPointerGet,genPointerSet): fixed handling of __code pointers,
1079             pointers to constant data are no longer assumed to point to __code
1080             space, removed invalid pointer types,
1081           (bitpatternFromVal): retrieve the PICs representation of an integer
1082             or float literal,
1083           (genDataPointerSet): fixed assigning to po_immediate operands,
1084           (genGenPointerSet): implemented as library call,
1085           (genIfx): fixed incorrect condition,
1086           (genAddrOf): limit generic pointers' addresses to 2 bytes,
1087             provide GPOINTER tag according to destination's storage class,
1088           (genCast): added code to handle casting to generic pointers, added
1089             sign-/zero extension of the result
1090           (aop_isLitLike,op_isLitLike): fixed handling of immediates
1091         * src/pic/gen.h: added macros to access IRP bit in STATUS register
1092         * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1093           extend the result
1094         * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1095           address/register resides in the shared banks
1096           (emitSymbolToFile): improved to handle global and `pinned' symbols,
1097             put all variables into separate sections (have the linker arrange
1098             them)
1099           (picglue): put init code and interrupt handlers in separate sections
1100         * src/pic/main.c: added port specific options table, modified to PORT
1101           structure to make GPOINTERs 3 byte, added pic14_options
1102           (_pic14_do_link): private linking routine (update paths to libraries,
1103             add libsdcc.lib by default)
1104         * src/pic/main.h: declare pic14_options
1105         * src/pic/pcode.c: fixed instructions i/o relations,
1106           (RegCond): reverted to correct version,
1107           (newpCodeOpLit): truncate literals to 8 bit,
1108           (genericPrint): added debug output,
1109           (getRegFromInstruction): fixed for various operand types, simplified
1110           (BuildFlow): fixed broken handling of isntructions with labels
1111           (LinkFlow): start at last instruction in flow (skip trailing comments),
1112             pass the flow on to the next instruction after CALL
1113           (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1114           (insertPCodeInstruction): fixed inserting after a skip instruction,
1115           (DoBankSelect): fixed for labeled instructions
1116           (OptimizepBlock): honor --nopeep switch
1117           (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1118         * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1119         * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1120           (pCodeOptime2pCodes): allow disabling this optimization via
1121             --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1122             but is still buggy), started implementation of a dataflow based
1123             pCode optimization (CSE + dead code elimination)
1124           (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1125         * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1126           names are independant of the stack location and therefore portable across
1127           devices
1128
1129 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1130
1131         * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1132           (selectSpil): fixed bug 1337835 by not spilling bit variables
1133         * support/regression/tests/bug1337835.c: added test for this bug
1134         * src/mcs51/peeph.def: restart after rule 3.c,
1135           addded rules 263.x to optimize loading constants
1136
1137 2005-10-26 Raphael Neider <rneider AT web.de>
1138
1139         * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1140         * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1141           (genAssign): emit warning when casting literals to generic pointer
1142             type, also applies when taking the address of a fixed variable,
1143           (genCast): improved casting to generic pointers
1144         * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1145           extern variables, added verbose error message
1146         * device/include/pic16/{string.h,errno.h}: added #pragma library c
1147
1148 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1149
1150         * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1151         carry must be complemented too
1152         * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1153         could be emitted by genMinus
1154         * src/SDCCval.c (constVal): fixed bug 1305065
1155
1156 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1157
1158         * src/SDCCast.c (addCast): added promotion for bit variables
1159         (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1160         promotion casts + optimisation
1161         (optimizeGetWord): fix warning 'i' might be used uninitialized
1162         * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1163         * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1164
1165 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1166
1167         * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1168         all chars are promoted to int; promotion should be handled in SDCCast.c
1169
1170 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1171
1172         * device/lib/_strcmp.c: Fixed bug 1326457
1173
1174 2005-10-11 Raphael Neider <rneider AT web.de>
1175
1176         * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1177         * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1178
1179 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1180
1181         * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1182         * support/regression/tests/sfr16.c: added test for the sfr32 bug
1183
1184 2005-10-04 Raphael Neider <rneider AT web.de>
1185
1186         * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1187           device/lib/pic16/pics.all: added pic18f1320
1188         * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1189
1190 2005-09-30 Raphael Neider <rneider AT web.de>
1191
1192         * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1193         * src/pic16/devices.inc: NEW, provides device descriptions
1194         * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1195
1196 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1197
1198         * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1199           GETHBIT
1200
1201 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1202
1203         * doc/sdccman.lyx: updated Highest Order Bit documentation,
1204           documented Any Order Bit, Higher Order Byte and Higher Order Word
1205         * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1206         * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1207           (optimizeGetAbit): new, to get any bit, not only the high bit,
1208           (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1209           (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1210           (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1211           (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1212             RIGHT_OP: also try GETBYTE, GETWORD optimization,
1213             GETABIT, GETBYTE, GETWORD: decorate them,
1214           (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1215           (ast_print): added GETABIT, GETBYTE, GETWORD
1216         * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1217         * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1218           (geniCodeBinary): new generic binary icode,
1219           (ast2iCode): added GETABIT, GETBYTE, GETWORD
1220         * src/port.h: updated comment for PORT.hasExtBitOp
1221         * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1222           (genGetByte): new, to get a single byte,
1223           (genGetWord): new, to get a word from a long,
1224           (gen51Code): added GETABIT, GETBYTE, GETWORD
1225         * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1226
1227 2005-09-23 Raphael Neider <rneider AT web.de>
1228
1229         * configure.in, configure: have device/lib/pic configured
1230         * device/lib/Makefile.in: added model-pic14
1231         * device/lib/clean.mk: added pic/ to clean rule
1232         * device/lib/pic: added rudimentary pic14 library providing support
1233           functions for multiplication/division/generic pointer access
1234         * src/SDCCopt.c (convilong): mark support functions as extern
1235           for pic14 port as well
1236         * src/pic/gen.c (genMult): added assertions,
1237           (genpic14Code): emit warning on unhandled iCodes
1238         * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1239         * src/pic/pcode.c (pCodeOpCopy),
1240         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1241           pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1242           SFR_REGISTER}), made safe for future extensions
1243         * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1244           instructions even if preceeded by SKIP instructions (also remove
1245           them); removed unused code
1246         * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1247           prevents leaving parts of the structure uninitialized after copying
1248
1249 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1250
1251         * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1252           ago by me
1253         * support/regression/tests/addsub.c: added test for the bug
1254
1255 2005-09-21 Raphael Neider <rneider AT web.de>
1256
1257         * device/include/pic16/pic18f1220.h,
1258           device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1259         * device/lib/pic16/Makefile.rules: added missing opening paren
1260         * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1261           are provided in genutils.c,
1262           (genUminusFloat,genUminus,genCmpEq): added asserts on different
1263           operand/result sizes,
1264           (genCmp): assert on NULL pointers first, then check deref'ed values
1265         * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1266           result size
1267
1268 2005-09-18 Raphael Neider <rneider AT web.de>
1269
1270         * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1271           as these are now unused,
1272           (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1273         * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1274           local, avoids uninitialized pointer dereference on r->name
1275         * src/pic16/ralloc.c (newReg): fixed indentation
1276
1277 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1278
1279         * src/SDCCval.c (constVal): fixed bug 730366
1280         * support/Util/SDCCerr.c,
1281         * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1282
1283 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1284
1285         * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1286
1287 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1288
1289         * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1290
1291 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1292
1293         * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1294           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1295         * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1296           (hex2dec): made hex_digit unsigned char, removed ascii dependance
1297         * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1298         * packihx/packihx.c (hexDigit): made c unsigned char
1299         * as/mcs51/lklibr.c (fndsym),
1300         * link/z80/lkgb.c (gb),
1301         * link/z80/lklibr.c (fndsym),
1302         * link/z80/lkrloc.c (relr),
1303         * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1304         * src/SDCC.lex (checkCurrFile, process_pragma),
1305         * src/SDCCglue.c (spacesToUnderscores),
1306         * src/SDCCmain.c (setParseWithComma, processFile),
1307         * src/asm.c (tvsprintf, printCLine),
1308         * src/avr/gen.c (emitcode, aopPut),
1309         * src/ds390/gen.c (emitcode),
1310         * src/hc08/gen.c (emitcode, emitinline),
1311         * src/mcs51/gen.c (emitcode, genInline),
1312         * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1313           tokenizeLineNode),
1314         * src/pic/ralloc.c (debugLog),
1315         * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1316           tokenizeLineNode),
1317         * src/pic16/ralloc.c (debugLog),
1318         * src/z80/main.c (_process_pragma):
1319            made all ctype.h function calls safe
1320         * src/SDCCopt.c: include math.h for fabs
1321         * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1322           and used them throughout the code to make ctype.h function calls safe
1323         * src/ds390/main.c (asmLineNodeFromLineNode),
1324         * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1325         * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1326            unsigned char*
1327         * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1328           (newpCodeAsmDir): made ctype.h function calls safe
1329         * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1330           pic16_emitcode):  made lbp unsigned char*
1331         * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1332           (pic16_newpCodeAsmDir): made ctype.h function calls safe
1333         * src/xa51/gen.c (emitcode),
1334         * src/z80/gen.c (_emit2): made lbp unsigned char*
1335         * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1336            char*
1337
1338 2005-09-05 Raphael Neider <rneider AT web.de>
1339
1340         * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1341           access bank splitpoint
1342
1343 2005-09-05 Raphael Neider <rneider AT web.de>
1344
1345         * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1346
1347 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1348
1349         * .version: changed to version 2.5.3
1350         * doc/sdccman.lyx: changed version to 2.5.3,
1351           documented --codeseg and --constseg and pragma codeseg and constseg,
1352           documented bit parameters (reentrant) and bit returning
1353         * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1354            currFunc->recvSize, but is this ok for all ports?
1355           (ast2iCode): result of ~ on unsigned char must be cast to int for
1356            bool to work
1357         * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1358           function pointers in bit space
1359         * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1360           (processFuncArgs): call port.reg_parm() with reentrancy info
1361         * src/port.h,
1362         * src/avr/main.c,
1363         * src/ds390/main.c,
1364         * src/hc08/main.c,
1365         * src/pic/main.c,
1366         * src/pic16/main.c,
1367         * src/xa51/main.c,
1368         * src/z80/main.c: port.reg_parm prototype extended with
1369           "bool reentrant" parameter
1370         * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1371           options.stackAuto for allocating bit register parameters
1372         * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1373           (genSend): set BitBankUsed if it is,
1374           (selectRegBank): factored out of genCall for use in genPcall,
1375           (genCall): removed redundant dtype assignmen, use selectRegBank,
1376           (genPcall): handle returning in Carry properly, save in F0 if needed,
1377           (genReceive): handle bit register parameters
1378         * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1379           (mcs51_assignRegisters): enable bit registers for all reentrant
1380            functions and don't set BitBankUsed unconditionally
1381         * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1382         * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1383         * support/regression/tests/funptrs.c: added tests for BOOL and for return
1384
1385 2005-08-27 Borut Razem <borut.razem AT siol.net>
1386
1387         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1388         ppc-osx (Darwin) does not support -u option. It seems that it is
1389         supported only on Linux - GNU cp
1390
1391 2005-08-25 Borut Razem <borut.razem AT siol.net>
1392
1393         * sim/ucsim/gui.src/serio.src/Makefile.in,
1394           sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1395           sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1396           sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1397           install and strip, since the strip at /usr/ccs/bin should be used
1398           on solaris
1399
1400 2005-08-24 Borut Razem <borut.razem AT siol.net>
1401
1402         * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1403
1404 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1405
1406         * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1407         ffffffffu
1408
1409 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1410
1411         * as/mcs51/aslink.h: completed lkrloc.c prototypes
1412         * as/mcs51/lkmain.c (link_main): fixed warning
1413         * device/include/stdbool.h: ds390 has no advanced bit support yet
1414         * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1415         * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1416         * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1417           and updated their macros
1418         * src/SDCCval.c (constVal): updated comment for renamed b_long
1419
1420 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1421
1422         * as/mcs51/asdata.c: changed ctype['['] to BINOP
1423         * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1424           (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1425           (oprio): set priority for '['
1426         * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1427            and adb_24_bit
1428         * as/mcs51/asm.h: added defines R_BIT and S_BIT
1429         * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1430         * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1431         * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1432           added overlayable BIT_BANK area
1433         * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1434           (summary2): explain 'T' in legenda
1435         * as/mcs51/lkrloc.c: replaced old K&R style,
1436           (relr): added R_BIT processing,
1437           (errmsg): added "Bit-addressable relocation error",
1438           (adb_bit): added for converting from byte- to bit-addressable space,
1439           (adb_24_bit): added for converting from byte- to bit-addressable space
1440         * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1441            used in reentrant functions now even as return value
1442         * device/lib/_gptrput.c (_gptrput): removed obsolete code
1443         * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1444           (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1445         * src/SDCCglobl.h: added indicator BitBankUsed
1446         * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1447            the bit registers b0-b7
1448         * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1449           (geniCodeCast): fixed bug 1263853,
1450           (geniCodeLogicAndOr): put result in bool or char,
1451           (geniCodeReceive): added parameter func for accessing the return type,
1452           (geniCodeFunctionBody): pass func to geniCodeReceive
1453         * src/SDCCmain.c: added indicator BitBankUsed
1454         * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1455         * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1456           (checkSClass): don't put automatic bool/bit on stack,
1457           (checkFunction): removed check on function cannot return bit
1458         * src/SDCCsymt.h: added newBoolLink prototype
1459         * src/mcs51/gen.c (rb1regs): added bit registers,
1460           (movc): created for assigning to carry,
1461           (pushReg, popReg): created for pushing registers,
1462           (sameRegs): check both AOP_REG and AOP_CRY types,
1463           (aopOp): handle bit registers,
1464           (aopPut): optimization no self-assign,
1465           (saveRegisters): push reg->base (bits) only once for bit registers,
1466            and use pushReg,
1467           (unsaveRegisters): pop reg->base only once and use popReg,
1468           (assignResultValue): added parameter func and return in carry for bits,
1469           (genIpush): optimization no reload in A if not changed,
1470           (genSend): bit parameters in reentrant functions are passed in bit
1471            registers by first assigning to bits in B, then save registers and
1472            copy B to bits,
1473           (genCall): handle returning in Carry properly, save it in F0 if needed,
1474           (genPcall): updated assignResultValue call, this is not safe yet for bit
1475            returning function !!!
1476           (genFunction): don't generate equ's for bit registers and use pushReg,
1477           (genEndFunction): take care of bit returning functions and use popReg,
1478           (genRet): return bit in Carry,
1479           (genIfx): optimize bit registers and other directly addressable bits,
1480           (genReceive): updated assignResultValue call
1481         * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1482           (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1483            registers when using stack-auto
1484         * src/mcs51/ralloc.c (_G): added allBitregs,
1485           (regs8051): added the bit registers,
1486           (createStackSpil): use macro IS_BIT,
1487           (getRegBit): added to allocate a bit register, else spill,
1488           (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1489           (updateRegUsage): factored out to ease stepping while debugging,
1490           (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1491            also allocate bit registers,
1492           (fillGaps): handle bit registers,
1493           (findAllBitregs): added to create bit vector with all bit registers,
1494           (mcs51_allBitregs): returns this bit vector,
1495           (mcs51_assignRegisters): when using stack-auto use bit registers for
1496            passing parameters and creating local variables
1497         * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1498
1499 2005-08-22 Borut Razem <borut.razem AT siol.net>
1500
1501         * device/lib/Makefile.in: replaced find option -or with -o
1502           to make it run on solaris
1503
1504 2005-08-22 Raphael Neider <rneider AT web.de>
1505
1506         * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1507           fixes #1265442 (crash on Solaris)
1508
1509 2005-08-20 Borut Razem <borut.razem AT siol.net>
1510
1511         * configure, configure.in: added tests for libsocket and libnsl libraries,
1512           requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1513           from support/regression/Makefile.in
1514         * support/regression/Makefile.in: added
1515         * device/lib/pic16/Makefile.common.in: force make to use bash shell
1516         * sim/ucsim/libtool: regenerated on sparc-solaris
1517         * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1518           sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1519           sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1520           -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1521           sparc-solaris, which doesn't use GNU ld linker
1522         * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1523         * as/Makefile: find on sparc-solaris does not support -maxdepth option
1524
1525 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1526
1527         * src/mcs51/peeph.def: updated comments
1528
1529 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1530
1531         * device/lib/_gptrget.c,
1532         * device/lib/_gptrput.c: slightly shorter
1533         * doc/sdccman.lyx: incremented version
1534         * src/mcs51/peeph.def: moved peephole comments to the line of first
1535           change to better keep line correlation, reanimated 186.e
1536         * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1537
1538 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1539
1540         * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1541           David Saxton with quotes around file name.
1542
1543 2005-08-15 Borut Razem <borut.razem AT siol.net>
1544
1545         * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1546           support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1547           support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1548           make tests run on x86_64 platform
1549
1550 2005-08-13 Raphael Neider <rneider AT web.de>
1551
1552         * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1553           as it might be executed DURING a build (parallel make is wonderful)
1554
1555 2005-08-13 Raphael Neider <rneider AT web.de>
1556
1557         * device/lib/Makefile.in (port-specific-objects-pic16):
1558           revert to cp $(PORT)/bin/*.* $(PORTDIR)
1559         * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1560           dependency
1561         * device/lib/pic16/Makefile.rules: build subdirs before creating
1562           the library, removed builddir rule, create $(builddir) early in
1563           recurse rule, use empty recurse rule for leaf directories
1564         * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1565           mkdir errors (race condition), removed duplicate suffix "hex"
1566           from clean rules
1567         * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1568         * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1569           prevents mkdir -p from aborting on Alpha
1570
1571 2005-08-12 Raphael Neider <rneider AT web.de>
1572
1573         * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1574           db-statements in order to allow for arrays of pointers in code
1575           sections to be placed without interspersed 0-padding, fixes
1576           bug #1256215
1577         * (emitStatistics): fixed division by zero for pic18f1220
1578         * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1579           unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1580         * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1581         * (pic16_pCodeConstString): keep track of already emitted string
1582           literals to prevent "duplicate definitions of symbol _str_NR"
1583         * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1584           debug message
1585         * device/lib/Makefile.in: ignore failing PIC16 library builds
1586         * device/lib/pic16/Makefile: do not build if gputils are missing
1587         * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1588
1589 2005-08-10 Raphael Neider <rneider AT web.de>
1590
1591         * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1592           my last commit)
1593
1594 2005-08-10 Raphael Neider <rneider AT web.de>
1595
1596         * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1597           Rokas' patch to add the new fixed point type "__fixed16x16"
1598         * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1599           functions for __fixed16x16 arithmetics
1600         * device/lib/pic16: reimplemented the build system to support
1601           a separate build directory, better handling of libio (create
1602           the library in a separate subdir for each architecture) and
1603           easier configuration (centralized in Makefile.common)
1604
1605 2005-08-07 Raphael Neider <rneider AT web.de>
1606
1607         * src/pic16/gen.c (genrshTwo): fixed sign extension
1608         * src/pic16/device.c: added pic18f2320, 4220 and 4320
1609         * device/include/pic16/pic18f2220.h: changed some bit definitions,
1610           added T0CONbits
1611         * device/include/pic16/pic18f4220.h: NEW, header for
1612           pic18f4220 and pic18f4320
1613         * device/include/pic16/pic18fregs.h: added new devices,
1614           embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1615         * device/include/pic16/signal.h: resolved name clashes
1616           on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1617           to also allow testing for interrupt enable bits, added
1618           comments on how to use the macros
1619         * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1620         * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1621           register definitions for the devices
1622         * device/lib/pic16/pics.all: added new devices
1623         * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1624           allocated memory
1625         * device/lib/pic16/libc/stdlib/memfree: do not count
1626           the block header as free memory
1627         * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1628           simplified and added missing end-of-blocklist-marker
1629           (reported by Peter Onion, fixes #1252814)
1630         * (_mergeHeapBlock): fixed loop condition
1631         * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1632           len==0, restructured code
1633         * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1634           up a bit, reduced bitfield accesses, prevent endless loops
1635           in case of heap corruption
1636         * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1637           "unreferenced arguments/must return a value" warnings
1638         * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1639           replaced BAUDREG with SPBRG
1640         * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1641           device/lib/pic16/debug/gstack/gstack.c: replaced
1642           _naked, _asm, _endasm with __naked, __asm, __endasm
1643
1644 2005-08-05 Raphael Neider <rneider AT web.de>
1645
1646         * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1647           AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1648
1649 2005-08-05 Borut Razem <borut.razem AT siol.net>
1650
1651         * device/lib/Makefile.in: added missing ';'
1652         * configure: removed ^M characters
1653
1654 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1655
1656         * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1657           device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1658           License
1659
1660 2005-08-04 Borut Razem <borut.razem AT siol.net>
1661
1662         * configure.in: pic16 libraries build 2nd try - enable running
1663           configure in device/lib/pic16
1664         * configure: regenerated from configure.in
1665         * device/lib/Makefile.in: create $(PORT)/bin directory
1666
1667 2005-08-03 Raphael Neider <rneider AT web.de>
1668
1669         * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1670           to get/set values via pointers
1671         * (genUnpackBits,genPackBits): changed detection of
1672           ptr->bitfield vs. sym.bitfield, fixed access via generic
1673           pointers, removed dead (wrong) code for multibyte bitfields
1674         * (genNearPointerGet, genGenPointerGet): removed useless code,
1675           fixed bitfield detection, fixes #1250594
1676         * (genNearPointerSet): removed useless code
1677         * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1678           and introduced macro pic16_emitpcode that conditionally emits
1679           the origin of the following pCode (useful for debugging SDCC)
1680         * src/pic16/pcode.c: changed (and disabled) some debug outputs
1681         * (createDefmap): fixed handling of LFSR for --optimize-df
1682
1683 2005-08-02 Borut Razem <borut.razem AT siol.net>
1684
1685         * device/lib/Makefile.in: pic16 libraries build enabled since
1686           gputils-0.13.2 are now localy installed at sourceforge's compile farm
1687
1688 2005-08-02 Raphael Neider <rneider AT web.de>
1689
1690         * src/pic16/gen.c (genPackBits): removed deprecated warning
1691         * (genGenPointerSet): fixed bitfield detection
1692
1693 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1694
1695         * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1696
1697 2005-07-31 Raphael Neider <rneider AT web.de>
1698
1699         * device/lib/pic16/libdev/pic18f458.c,
1700           device/include/pic16/pic18f458.h: added missing T0CONbits
1701
1702 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1703
1704         * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1705
1706 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1707
1708         * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1709
1710 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1711
1712         * device/include/mcs51/at89c51ed2.h: added.
1713
1714 2005-07-23 Raphael Neider <rneider AT web.de>
1715
1716         * src/pic/gen.h: added emitpcode macro for debugging
1717         * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1718           and replace by macro adding debug information on demand
1719         * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1720         * (gencjne): tried to fix; replaced with correct (slower) code
1721         * (gen{Unp,P}ackBits): fixed single bit access
1722         * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1723         * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1724           previous instruction
1725         * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1726           register has to be handled with care (forbidding movement
1727           of assignments/uses, removing assignments completely, ...)
1728         * (pCodeOptime2pCodes): make use of regIsSpecial
1729         * added lots of debugging output (commented out)
1730         * src/pic/rallloc.c (deassignLRs): prevent operand registers
1731           from being reused as result UNLESS it is known to work
1732
1733 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1734
1735         * support/Util/dbuf.h: include <stddef.h> for size_t
1736         * .version: changed to version 2.5.2
1737
1738 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1739
1740         * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1741
1742 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1743
1744         * src/hc08/gen.c (genMinus): fixed bug #1241835,
1745           (genModOneByte): removed needless psha/pula
1746
1747 2005-07-22 Raphael Neider <rneider AT web.de>
1748
1749         * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1750           have PIC14 handled like PIC16, fixes broken pic14 linker calls
1751         * src/pic/gen.c (resolveIfx): do not "invent" labels
1752         * (genSkipc): changed to positive logic
1753         * (genSkipCond): removed as no longer needed
1754         * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1755           backport from PIC16
1756         * (genLeftShift): check operands are in different registers
1757         * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1758           INCF does not update CARRY...
1759         * src/pic/main.c: fixed _linkCmd
1760         * src/pic/pcode.c (unlinkpCode): added inactive code
1761         * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1762           alive (do not assign result and operand overlapping registers)
1763
1764 2005-07-22 Raphael Neider <rneider AT web.de>
1765
1766         * src/pic/device.c (dump_sfr): replaced register declaration with
1767           call to emitSymbolToFile() to avoid duplicate symbols
1768         * (assignRelocatableRegisters): do not declare external symbols
1769         * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1770           right (take size of type, not etype)
1771         * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1772         * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1773         * (packRegsForAccUse): disabled assignment of WREG as
1774           the result reg to prevent occurence of just fixed #1235003,
1775           fixes #1242954
1776         * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1777           symbols (avoids duplicate symbols in .asm file)
1778         * (pic14emitRegularMap): use emitSymbolToFile()
1779         * src/pic/gen.c (aopOp): fixed spillLocation handling
1780         * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1781         * (genDataPointerSet): removed unneccessary variables/output
1782
1783 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1784
1785         * as/mcs51/lkarea.c: enlarged codemap for banked memory
1786         * device/lib/mcs51/crtbank.asm: added # to 0x0F
1787
1788 2005-07-21 Raphael Neider <rneider AT web.de>
1789
1790         * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1791           architecture cannot handle them efficiently, fixes bug #1235003
1792         * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1793           check for empty sets before using them (fixes bug #1232190)
1794
1795 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1796
1797         * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1798           (lnksect2): generate warnings for memory overlap
1799         * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1800           constseg to set the name of these segments so you can instruct the linker
1801           to place them in banks
1802         * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1803         * src/SDCCglobl.h: added MODEL_HUGE to enum,
1804           added code_seg and const_seg to options
1805         * src/SDCCglue.c (emitMaps): use options.const_seg,
1806           (createInterruptVect): put interrupt vectors in segment HOME,
1807           (glue): put HOME before static segment and put the main glue in HOME,
1808           (glue): use options.code_seg
1809         * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1810         * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1811           these segments so you can instruct the linker to place them in banks
1812           (linkEdit): use code_loc for HOME segment which should be the first
1813           segment in code memory now
1814         * src/SDCCmem.c: fixed more stuff like bug 1238386
1815         * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1816           (changePointer): don't change function pointers to code pointers for
1817           banked functions,
1818           (compareType): added exceptional check for banked function pointers
1819         * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1820         * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1821           after static in code memory
1822         * src/mcs51/gen.c: added aopLiteralLong prototype,
1823           (aopForSym): use getSize for functions,
1824           (genCall): generate banked calls over one trampoline __sdcc_banked_call
1825           in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1826           -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1827           the segment,
1828           (genPcall): use call for literal function pointers and generate banked
1829           calls over the one trampoline so there's only one place for the user to
1830           modify according to his/hers hardware,
1831           (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1832           (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1833         * src/mcs51/main.c: added keyword banked,
1834           (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1835         * support/Util/SDCCerr.c,
1836         * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1837           needed for passing the bank and address to the trampoline
1838         * device/lib/mcs51/crtbank.asm: added for bankswitching
1839         * device/lib/mcs51/Makefile: added crtbank
1840
1841 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1842
1843         * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1844           for fields at offset 0 of a struct or union as reported
1845           on 2005-07-07 in the developer mailing list.
1846
1847 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1848
1849         * src/SDCCmem.c: fixed bug 1238386
1850
1851 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1852
1853         * src/mcs51/peeph.def: added labelrefcounting for peepholes
1854           (patch #1144962), added peephole 300, enabled 259.x
1855         * doc/sdccman.lyx: removed screenshot and provided link instead
1856
1857 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1858
1859         * doc/sdccman.lyx: added section about debugging with ddd
1860         * doc/figures/ddd_example.eps: screenshot of debugging session
1861
1862 2005-07-04 Raphael Neider <rneider AT web.de>
1863
1864         * src/pic/gen.c (genPointerGet): handle pointers to CONST values
1865           like CODE pointers, fixes #1115683
1866         * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
1867           call, fixes bugs #1232211, #1228110,
1868           fixed wrong casts to pCodeFlow from pCodeInstructions
1869
1870 2005-07-04 Raphael Neider <rneider AT web.de>
1871
1872         * src/pic/gen.c (popGet): changed assert to allow for
1873           bit operands
1874         * (popGetAddr): changed signature to provide
1875           an additional index, patched all call sites
1876         * (genCmpEq): handle literal-like operands correctly
1877         * (genAddrOf): added sanity checks on __code/__data pointers
1878         * (genAssign): added handling of symbols from __code section
1879         * (gencjne): do not generate code for comparisons whose result
1880           is neither stored nor used, fixes bug #1171114
1881         * (AccLsh, AccRsh): operate on operand instead of WREG
1882         * (shift{Left,Right}_Left2ResultLit): NEW, size independant
1883           replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
1884           by known count
1885         * rewrote complete shift-by-literal logic, commented unused
1886           functions out
1887         * (genConstPointerGet): get multiple bytes (if result size > 1),
1888           fixed handling of non-immediate addresses
1889         * (genPointerGet): handle CODE pointers like CONST pointers
1890         * (genpic14Code): insert C-SRC lines as Cource-pCodes
1891         * ({aop,op}_isLitLike): NEW, single place to decide whether an
1892           operand is to be treated as a literal or not
1893         * (mov2w,genPcall,genCmpEq),
1894           src/pic/genarith.c: use aop_isLitLike() to decide between
1895           literal/register contents
1896         * (addSign): added missing offset
1897         * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
1898           only emit comment in debug-mode,
1899           use {aop,op}_isLitLike throughout the file
1900         * src/pic/glue.c: fix initializers for pointers (work in progress)
1901         * src/pic/pcode.c (get_op): honor index on _const symbols
1902         * ({reset,dump}pCodeStatistics): NEW, estimate code size
1903         * (dumppBlock): added pCode size estimation
1904         * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
1905           check for IS_SYMOP before OP_SYMBOL'ing
1906         * fixed indentation, compacted switch-statements
1907         * (allocReg): find free register and allocate it instead of
1908           allocating new registers all the time
1909         * (deassignLRs): prevent POINTER_GET's from being assigned the same
1910           registers as its operands (necessary only for multibyte GETs)
1911
1912 2005-07-01 Raphael Neider <rneider AT web.de>
1913
1914         * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
1915           debugging .asm-output macros FENTRY + FEXIT
1916         * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
1917           way... I wonder...
1918         * (emitpComment): NEW, printf to pCode
1919         * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
1920           offset handling
1921         * (popGetAddr): NEW, variant of popGet to access an immediates
1922           high(er) bytes instead of the n'th byte of memory they reference,
1923           replaced popGet with popGetAddr where neccessary
1924         * (genDataPointerGet): reactivated and fixed implementation
1925         * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
1926           accesses
1927         * (genDataPointerSet): fixed multibyte assignments
1928         * (genpic14Code): fixed --i-code-in-asm handling
1929         * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
1930         * (genPlus): fixed index-out-of-bounds error
1931         * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
1932         * src/pic/ralloc.c: added debugging output macro FENTRY2
1933         * (spillThis): fixed indentation, enbraced for-body for clarity
1934         * (rematStr): commented out as now unused
1935         * (regTypeNum): commented out special spill case (overwrites
1936           arbitrary values)
1937         * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
1938
1939 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
1940
1941         * doc/sdccman.lyx: documented sfr16/sfr32,
1942           added example for using storage class with function pointers
1943         * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
1944
1945 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
1946
1947         * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
1948         * device/lib/_itoa.c,
1949         * device/lib/_ltoa.c: optimized codesize
1950         * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
1951           but don't know how to suppress the double warning.
1952         * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
1953         * support/Util/SDCCerr.c,
1954         * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
1955
1956 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
1957
1958         * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
1959           fixed old K&R prototypes
1960         * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
1961         * device/lib/_gptrget.c,
1962         * device/lib/_gptrgetc.c,
1963         * device/lib/_gptrput.c: changed versions for new memory indicator values,
1964           also new versions for small generic pointers and banked generic pointers
1965         * src/port.h: added const_name
1966         * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
1967         * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
1968         * src/SDCCcse.c (findPrevIc): check all associative operators
1969         * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
1970         * src/SDCCicode.h: added macro IS_ASSOCIATIVE
1971         * src/SDCCmem.c: updated comments,
1972           set far-space to 0 for pdata, results in optimized code
1973         * src/SDCCmem.h: added macro CONST_NAME
1974         * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
1975           moving the info into the highest bits, see also gptrget/gptrput
1976         * src/src.dsp: added sdcc.ico to project files
1977         * src/avr/gen.c (genCast): fixed bug 0x%d
1978         * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
1979         * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
1980           relation between ptr_type and DCL_TYPE,
1981           (genCast): fixed bug 0x%d
1982         * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
1983           (CODE)" for const_name
1984         * src/hc08/gen.c (genCast): fixed bug 0x%d
1985         * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
1986           (hc08_port): added "CONST (CODE)" for const_name
1987         * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
1988           (aopForRemat, adjustArithmeticResult): disconnected direct relation
1989           between ptr_type and DCL_TYPE,
1990           (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
1991           operand* and took AOP() inside function so sfr-ness can be checked,
1992           (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
1993           new prototype,
1994           (genFunction, genEndFunction): optimized stack setup,
1995           (genMinus): optimized for literals with ending zeroes (in bytes),
1996           (genCast): fixed bug 0x%d
1997         * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
1998           (mcs51_port): added "CONST (CODE)" for const_name
1999         * src/mcs51/peeph.def: made rule 226 more generic
2000         * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2001         * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2002         * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2003         * src/z80/main.c (z80_port): added NULL for const_name,
2004           (gbz80_port): added NULL for const_name
2005         * support/regression/tests/bug663539.c,
2006         * support/regression/tests/sfr16.c: new tests
2007
2008 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2009
2010         * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2011
2012 2005-06-24 Raphael Neider <rneider AT web.de>
2013
2014         * device/lib/pic16/libdev/pic18f[68][567]20.c:
2015           corrected typos...
2016         * device/include/pic16/signal.h: added USBIF
2017           and SIG_USB
2018
2019 2005-06-24 Raphael Neider <rneider AT web.de>
2020
2021         * device/lib/pic16/libdev/pic18f2455.c,
2022           device/include/pic16/pic18f2455.h: NEW
2023         * device/include/pic16/pic18fregs.h,
2024           device/lib/pic16/pics.all,
2025           src/pic16/device.c: added 18f2455
2026         * device/lib/pic16/libdev/pic18f[68][567]20.c,
2027           device/include/pic16/{pic18f[68][567].h,usart.h}:
2028           replaced MULTIPLE_USARTS define with more relaible
2029           compatibility sfrs (for USART access)
2030
2031 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2032
2033         * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2034           and the output asm file line is printed on two lines.
2035
2036 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2037
2038         * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2039           BGT, BLE, BHI, and BLS instructions
2040         * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2041           genCmpEq): removed
2042         * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2043           negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2044           fixes bug #1216342
2045         * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2046
2047 2005-06-15 Raphael Neider <rneider AT web.de>
2048
2049         * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2050         * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2051         * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2052           fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2053           OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2054
2055 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2056
2057         * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2058           Marcel Telka in bug #1215704
2059
2060 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2061
2062         * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2063           located in shared memory bank.
2064
2065 2005-05-31 Raphael Neider <rneider AT web.de>
2066
2067         * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2068           "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2069           "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2070
2071 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2072
2073         * device/lib/_strncpy.c: fixed the fix
2074
2075 2005-05-26 Raphael Neider <rneider AT web.de>
2076
2077         * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2078           initializers with \0, bug #1208187
2079         * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2080           intializers with \0, bug #1208187
2081
2082 2005-05-26 Raphael Neider <rneider AT web.de>
2083
2084         * src/pic16/glue.c (pic16_printIvalChar): fixed string
2085           initializers with \0, bug #1208187
2086         * src/pic16/main.c (_process_pragma): added sanity checks
2087           for stack position and size, emit warnings when appropriate
2088
2089 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2090
2091         * device/lib/_strncpy.c: fixed not filling with \0
2092
2093 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2094
2095         * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2096           createFunction),
2097         * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2098           compound_statement),
2099         * src/SDCCsymt.h,
2100         * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2101
2102 2005-05-24 Raphael Neider <rneider AT web.de>
2103
2104         * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2105
2106 2005-05-24 Raphael Neider <rneider AT web.de>
2107
2108         * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2109           TRISE definitions, closes bug #1162453
2110
2111 2005-05-22 Raphael Neider <rneider AT web.de>
2112
2113         * src/pic16/main.c (_process_pragma): check for missing
2114           arguments to pragmas code and udata
2115         * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2116           consistency fixes to match other headers (thanks to Jim Paris)
2117         * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2118
2119 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2120
2121         * src/SDCCicode.c (isOperandEqual): fixed missing ;
2122
2123 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2124
2125         * support/regression/tests/bug1198642.c: new test
2126         * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2127         * src/SDCCcse.c (findPrevIc): added comment, please have a look
2128         * support/scripts/resource.h,
2129         * support/scripts/resource.rc,
2130         * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2131         * support/scripts/sdcc.ico: added 32x32 icon
2132
2133 2005-05-18 Raphael Neider <rneider AT web.de>
2134
2135         * device/lib/pic16/libdev/pic18f*.c,
2136         * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2137           keywords to "__sfr" and "__at (X)"
2138         * device/include/pic16/pic18fregs.h: added pic18f4520
2139         * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2140           #1203088 (MPLAB compatibility)
2141
2142 2005-05-17 Raphael Neider <rneider AT web.de>
2143
2144         * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2145         * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2146         * device/lib/pic16/pics.all: added new devices
2147         * src/pic16/device.c: added support for pic18f4520
2148
2149 2005-05-16 Raphael Neider <rneider AT web.de>
2150         * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2151         * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2152         * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2153           convenience function for bit access
2154
2155 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2156
2157         * device/lib/printf_large.c: fixed bug 1193299
2158         * support/regression/tests/bug1057979.c: added test %3.3s
2159
2160 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2161
2162         * device/include/mcs51/8051.h,
2163         * device/include/mcs51/8052.h: made parseable with lint
2164         * device/include/mcs51/lint.h: added include file for (sp)lint
2165         * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2166         * doc/cdbfileformat.lyx,
2167         * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2168
2169 2005-05-14 Raphael Neider <rneider AT web.de>
2170
2171         * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2172         * device/lib/pic16/libc/stdlib/itoa.c (new)
2173         * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2174         * device/lib/pic16/libio/Makefile: exclude subdir according to
2175           ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2176         * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2177         * src/pic16/gen.c (genFunction): prevent annoying warning
2178         * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2179           nameclashes on BeOS
2180         * support/cpp2/cppmain.c (cpp_output_string): new
2181         * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2182           fixes bug 1116802
2183
2184 2005-05-13 Borut Razem <borut.razem AT siol.net>
2185
2186         * src/SDCCmain.c (linkEdit): fixed bug 1195202
2187
2188 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2189
2190         * .version: changed to version 2.5.1; back to bleeding edge development
2191
2192 2005-05-11 Borut Razem <borut.razem AT siol.net>
2193
2194         * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2195           generate PDF version 1.3 documents
2196
2197 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2198
2199         * .version: changed to version 2.5.0
2200
2201 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2202
2203         * doc/sdccman.lyx: updated weblinks, index and smaller updates
2204
2205 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2206
2207         * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2208         --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2209         well as many smaller updates.
2210         * .version: changed to version 2.5.0-pre1
2211
2212 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2213
2214         * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2215
2216 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2217
2218         * support/regression/tests/bug1185672.c: added
2219         * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2220           bug 1185672
2221         * src/mcs51/gen.c (genCall): added comments, made it look safer
2222         * src/mcs51/gen.c (genEndFunction): simplified
2223
2224 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2225
2226         * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2227
2228 2005-04-14 Borut Razem <borut.razem AT siol.net>
2229
2230         * fixed bug 1045046 - SIGSEGV with really simple code?:
2231           src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2232           src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2233
2234 2005-04-14 Borut Razem <borut.razem AT siol.net>
2235
2236         * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2237           src/pic16/device.h: temporarily disabled experimental #inline pragma
2238           for 2.5.0 release
2239
2240 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2241
2242         * device/include/z80/stdio.h,
2243         * device/include/z80/string.h: removed these highly incomplete files so
2244           SDCC can use the default ones in device/include/
2245
2246 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2247
2248         * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2249         gcc warning.
2250         * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2251         fix sdcpp warnings.
2252
2253 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2254
2255         * device/include/malloc.h: removed redundant __reentrant prototypes
2256         * device/lib/_mullong.c: added working xstack variant in asm (C version
2257           doesn't pass regression tests)
2258         * device/lib/bpx.c: used __data and made bpx char for mcs51
2259         * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2260           (createFunction): fixed bug with xstackPtr
2261         * src/SDCCcse.c: corrected comments
2262         * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2263           (killDeadCode, eBBlockFromiCode): removed unused code
2264         * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2265           corrected comments
2266         * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2267           assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2268           genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2269           (genModOneByte): fixed warning in MSVC
2270         * src/mcs51/main.c (): added comments
2271         * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2272
2273 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2274
2275         * src/SDCCmain.c (linkEdit): oops, changed one line too many
2276
2277 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2278
2279         * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2280
2281 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2282
2283         * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2284         characters arrays of larger size than the declared one.
2285
2286 2005-04-10 Borut Razem <borut.razem AT siol.net>
2287
2288         * src/pic/gen.c (genInline),
2289           src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2290           (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2291           (findNextInstruction), (findPrevInstruction),
2292           (findInstructionUsingLabel),
2293           src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2294         * src/pic/pcode.c (findLabel): added missing '\n'
2295         * src/src.dsp: added SDCCdwarf2.c to the project
2296
2297 2005-04-09 Borut Razem <borut.razem AT siol.net>
2298
2299         * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2300
2301 2005-04-08 Raphael Neider <rneider AT web.de>
2302
2303         * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2304           into the chain after a given one) and mergeDefmapSymbols (combine
2305           defmap entries for each symbol per pcode)
2306         * (createDefmap): have defmap entries merged in the end
2307         * (defmapReplaceSymRef): split defmap entries covering two accesses to
2308           a symbol before replacing one access type's symbol, merge symbols in
2309           the end (replacement symbol might already have an entry)
2310         * (assignValnums): keep reference to written WREG intact
2311
2312 2005-04-08 Raphael Neider <rneider AT web.de>
2313
2314         * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2315           Alpha)
2316
2317 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2318
2319         * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2320         bytes
2321
2322 2005-04-07 Raphael Neider <rneider AT web.de>
2323
2324         * device/include/pic16/usart.h: added compatibility defines for
2325           devices with more than one USART
2326         * device/include/pic16/pic18f[68][567]20.h: activated above defines
2327
2328 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2329
2330         * device/lib/Makefile.in: updated for port specific include
2331
2332 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2333
2334         * support/regression/ports/mcs51/spec.mk: added mcs51 include
2335
2336 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2337
2338         * device/include/8051.h,
2339         * device/include/8052.h,
2340         * device/include/at89S8252.h,
2341         * device/include/at89c55.h,
2342         * device/include/at89x051.h,
2343         * device/include/at89x51.h,
2344         * device/include/at89x52.h,
2345         * device/include/mcs51reg.h,
2346         * device/include/reg51.h,
2347         * device/include/reg764.h,
2348         * device/include/regc515c.h,
2349         * device/include/sab80515.h: (re)moved these 12 files
2350         * device/include/mcs51/8051.h,
2351         * device/include/mcs51/8052.h,
2352         * device/include/mcs51/at89S8252.h,
2353         * device/include/mcs51/at89c55.h,
2354         * device/include/mcs51/at89x051.h,
2355         * device/include/mcs51/at89x51.h,
2356         * device/include/mcs51/at89x52.h,
2357         * device/include/mcs51/mcs51reg.h,
2358         * device/include/mcs51/reg51.h,
2359         * device/include/mcs51/reg764.h,
2360         * device/include/mcs51/regc515c.h,
2361         * device/include/mcs51/sab80515.h: and added them here
2362
2363 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2364
2365         * device/include/stdarg.h: changed SDCC specific keywords to double
2366           underlined form.
2367         * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2368           mcs51 and ds390.
2369         * device/include/hc08/mc68hc908gp32.h,
2370         * device/include/hc08/mc68hc908jb8.h,
2371         * device/include/hc08/mc68hc908jkjl.h,
2372         * device/include/hc08/mc68hc908qy.h: fixed comments
2373         * device/include/mcs51/README: updated
2374         * device/include/mcs51/c8051f120.h: added PINRSF
2375         * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2376         * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2377           amidst code. Also inline is not supported.
2378
2379 2005-04-06 Raphael Neider <rneider AT web.de>
2380
2381         * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2382         * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2383           callers stack/frame pointers
2384
2385 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2386
2387         * device/include/pic16/usart.h: added, missing in previous commit,
2388         * device/include/pic16/adc.h: fixed typo,
2389         * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2390         commit,
2391         * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2392         <p18fxxx.inc>
2393         * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2394         uninitialized because a bug appears with gplink
2395         * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2396         COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2397         complains for unrecognised option
2398
2399 2005-04-05 Raphael Neider <rneider AT web.de>
2400
2401         * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2402           structs as well (using memcpy)
2403         * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2404           on ISRs (GOTO has no label)
2405         * src/pic16/device.h: added OF_OPTIMIZE_DF
2406         * src/pic16/main.c: added compiler switch --optimize-df to enable the
2407           new data flow analysis/optimization
2408         * src/pic16/pcode.c: added (prototypes for and implementation of)
2409           dataflow analysis functions, fixed pCodeInstructions' inCond and
2410           outCond values, made RCALL a branch instruction
2411         * (pic16_unlinkpCode): keep C line if possible
2412         * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2413           C line moved if possible
2414         * (pic16_getRegFrompCodeOp): NEW, improved version of...
2415         * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2416           to use new pic16_getRegFrompCodeOp (works for more SFRs)
2417         * (pic16_BuildFlow): fixed skip instructions with label (did not start
2418           new flow)
2419         * (pic16_getJumptabpCode): NEW, needed in...
2420         * (LinkFlow): fixed handling of jumptables, calls and conditional
2421           branches
2422         * (pic16_InsertCommentAfter): NEW
2423         * (pic16_pCodeReplace): made verbose and flow preserving
2424         * (AnalyzeFlow): added call to data flow analysis
2425         * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2426         * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2427         * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2428
2429 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2430
2431         * src/SDCCast.c (decorateType): fixed bug #1105626
2432
2433 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2434
2435         * device/include/asm/pic16/features.h,
2436         * pic18f*.h headers,
2437         * device/include/pic16/adc.h,
2438         * device/include/pic16/delay.h,
2439         * device/include/pic16/i2c.h,
2440         * device/include/pic16/malloc.h,
2441         * device/include/pic16/stdio.h,
2442         * device/include/pic16/stdlib.h,
2443         * device/include/pic16/string.h,
2444         * device/lib/pic16/libc/stdio/printf_tiny.c,
2445         * device/lib/pic16/libc/stdio/printf_small.c,
2446         * device/lib/pic16/libc/stdio/strmgpsim.c,
2447         * device/lib/pic16/libc/stdio/strmmssp.c,
2448         * device/lib/pic16/libc/stdio/strmusart.c,
2449         * device/lib/pic16/libc/stdio/vfprintf.c,
2450         * device/lib/pic16/libc/stdlib/ltoa.c,
2451         * device/lib/pic16/libc/stdlib/putchar.c,
2452         * device/lib/pic16/libc/stdlib/x_ftoa.c,
2453         * device/lib/pic16/libc/stdlib/memchrpgm.c,
2454         * device/lib/pic16/libc/stdlib/memchrram.c,
2455         * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2456         * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2457         * device/lib/pic16/libio/adc/adcbusy.c,
2458         * device/lib/pic16/libio/adc/adcread.c,
2459         * device/lib/pic16/libio/adc/adcsetch.c,
2460         * device/lib/pic16/libio/usart/ubaud.c,
2461         * device/lib/pic16/libio/usart/ubusy.c,
2462         * device/lib/pic16/libio/usart/udrdy.c,
2463         * device/lib/pic16/libio/usart/uopen.c,
2464         * device/lib/pic16/libio/usart/uputc.c,
2465         * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2466         * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2467         * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2468         * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2469         * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2470         * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2471         * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2472         * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2473         specific keywords to double underlined form,
2474         * device/lib/pic16/libc/Makefile.rules,
2475         * device/lib/pic16/libsdcc/Makefile.rules,
2476         * device/lib/pic16/libm/Makefile,
2477         * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2478         to compile with C standard set in Makefile.common
2479         * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2480         rand.c and crc.c in compilation process,
2481         * device/lib/pic16/libsdcc/int/divuint.c,
2482         * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2483         `c' from signed to unsigned,
2484         * device/lib/pic16/startup/crt0.c,
2485         * device/lib/pic16/startup/crt0i.c,
2486         * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2487         keywords to double underlined form, bug fixes in _do_cinit function
2488         which prevented the correct initialization of the .idata segment,
2489         * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2490         core to enter a infinite loop
2491         * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2492
2493 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2494
2495         * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2496
2497 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2498
2499         * device/include/Makefile.in: add support for hc08 subdirectory
2500         * device/include/hc08/: new subdirectory
2501         * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2502         Lucas Loizaga, thanks!
2503         * device/include/hc08/mc68hc908qy.h,
2504         * device/include/hc08/mc68hc908gp32.h,
2505         * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2506         their own directory. Changed internal macro names to use the compiler
2507         reserved namespace. Changed SDCC specific keywords to double
2508         underlined form.
2509         * device/include/math.h,
2510         * device/include/malloc.h,
2511         * device/include/stdarg.h,
2512         * device/include/stdbool.h
2513         * device/include/string.h,
2514         * device/include/tinibios.h,
2515         * device/include/ds400rom.h,
2516         * device/include/8051.h,
2517         * device/include/8052.h,
2518         * device/include/80c51xa.h,
2519         * device/include/at89c55.h,
2520         * device/include/at89S8252.h,
2521         * device/include/at89x51.h,
2522         * device/include/at89x52.h,
2523         * device/include/ds80c390.h,
2524         * device/include/reg764.h,
2525         * device/include/regc515c.h,
2526         * device/include/sab80515.h,
2527         * device/include/mcs51/c8051f000.h,
2528         * device/include/mcs51/c8051f018.h,
2529         * device/include/mcs51/c8051f020.h,
2530         * device/include/mcs51/c8051f040.h,
2531         * device/include/mcs51/c8051f060.h,
2532         * device/include/mcs51/c8051f120.h,
2533         * device/include/mcs51/c8051f300.h,
2534         * device/include/mcs51/c8051f310.h,
2535         * device/include/mcs51/c8051f320.h,
2536         * device/include/mcs51/c8051f330.h,
2537         * device/include/mcs51/c8051f350.h,
2538         * device/include/z180.h: Changed SDCC specific keywords to double
2539         underlined form.
2540
2541 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2542
2543         * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2544         18F4455,
2545         * (pic16_assignConfigWordValue): disable testing of configuration
2546         register value with config mask,
2547         * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2548         function with port->fun_prefix,
2549         * (genFunction): when generating a naked interrupt function never
2550         create an absolute segment placed in interrupt vector address, place
2551         the actual interrupt function at IVA instead, when an interrupt
2552         function is generated with unspecified interrupt then do not create
2553         the absolute section,
2554         * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2555         code for generating a call to generic pointer get/put function with
2556         a call to function pic16_callGenericPointer(),
2557         * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2558         the call to the generic pointer get/put functions with prefixing the
2559         function name with port->fun_prefix,
2560         * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2561         * src/pic16/main.c (_process_pragma): prefix function with
2562         port->fun_prefix,
2563         * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2564         calling assembler, old 18Fxxxx macro is deprecated,
2565         * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2566         PC_ASMDIR in while condition,
2567         * (findInstruction): add PC_ASMDIR in while condition,
2568         * (buildCallTree): prefix main with port->fun_prefix,
2569         * (pic16_pCode2str): fixed bug that didn't emit the memory access
2570         identifier for variable with banked access in instructions BTFSS,
2571         BTFSC, BCF, BSF, BTG
2572         * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2573         * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2574         * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2575         perform optimization when enviroment variable NO_REG_OPT is set,
2576         * (insideLRBlock): NEW, return 1 if register is inside an
2577         INF_LOCALREGS block,
2578         * (RemoveRegFromLRBlock): remove a register that is completely
2579         eliminated by register optimization, but it is still left in local
2580         register store/restore in/from stack block,
2581         * (Remove2pcodes): after removing register, check to see if it
2582         should be removed from local register store/restore in/from stack
2583         block,
2584         * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2585         DUMMY_READ_VOLATILE,
2586
2587         * device/include/pic16/adc.h: minor prototype modifications and
2588         update,
2589         * device/include/pic16/malloc.h: added GPL notice various
2590         modifications,
2591         * device/include/pic16/stdint.h: NEW, standard header for ints
2592         * device/include/pic16/delay.h: NEW, header for delay functions,
2593         delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2594         delay1mtcy,
2595         * device/include/pic16/signal.h: NEW, header providing helper macros
2596         for implementing signal handlers,
2597         * device/include/pic16/stdio.h: added prototypes for functions,
2598         printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2599         prototypes for stdin and stdout, added macro PUTCHAR to
2600         automatically implement putchar function prototype,
2601         * device/include/pic16/usart.h: modified and updated USART library,
2602         * device/lib/pic16/libio/adc/,
2603         * device/lib/pic16/libio/i2c: some modifications to improve library
2604         performance,
2605         * device/lib/pic16/libc/stdio/: modifications for the new printf*
2606         family of functions,
2607         * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2608         family of functions and other sources,
2609         * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2610         of the PIC18Fxx[28] devices,
2611         * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2612         * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2613         * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2614         _do_cinit function, because the previous failed when local variables
2615         where not placed in the same memory bank,
2616         * device/lib/pic16/libsdcc/char/: various modifications to improve
2617         library performance,
2618         * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2619         information on the new functions of the c library and more...
2620
2621 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2622
2623         * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2624
2625 2005-03-26 Raphael Neider <rneider AT web.de>
2626
2627         * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2628           if condition == CARRY)
2629         * (genCmp): adapted to new genSkipc semantics
2630         * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2631           on rIfx (genCmp was broken)
2632
2633 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2634
2635         * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2636         * src/z80/main.c (_keywords[]),
2637         * src/SDCCglobal.h (struct options),
2638         * src/SDCC.y,
2639         * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2640         to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2641         std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2642         --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2643         always available in leading double underscore form. The C99 support is
2644         mostly missing, but it's a start.
2645         * support/regression/tests/bug-227710.c: fixed nonconforming use of
2646         reserved identifier "__data".
2647
2648 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2649
2650         * src/mcs51/peeph.def: fixed bug 1170013
2651
2652 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2653
2654         * device/include/mcs51reg.h: fixed bug 842007
2655
2656 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2657
2658         * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2659         last time.
2660
2661 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2662
2663         * src/port.h (struct PORT),
2664         * src/avr/ralloc.c (avr_assignRegisters),
2665         * src/avr/main.c,
2666         * src/ds390/ralloc.c (ds390_assignRegisters),
2667         * src/ds390/main.c,
2668         * src/hc08/ralloc.c (hc08_assignRegisters),
2669         * src/hc08/main.c,
2670         * src/mcs51/ralloc.c (mcs51_assignRegisters),
2671         * src/mcs51/main.c,
2672         * src/pic/ralloc.c (pic14_assignRegisters),
2673         * src/pic/main.c,
2674         * src/pic16/ralloc.c (pic16_assignRegisters),
2675         * src/pic16/main.c,
2676         * src/xa51/ralloc.c (xa51_assignRegisters),
2677         * src/xa51/main.c,
2678         * src/z80/ralloc.c (z80_assignRegisters),
2679         * src/z80/ralloc.h,
2680         * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2681         * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2682         * src/SDCCcse.h,
2683         * src/SDCCdflow.c (computeDataFlow),
2684         * src/SDCCdflow.h,
2685         * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2686         * src/SDCCloop.h,
2687         * src/SDCCcflow.c (*),
2688         * src/SDCCcflow.h,
2689         * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2690         * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2691         of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2692         immedDom() returning wrong block; probably fixes bug #1160833)
2693
2694 2005-03-20 Borut Razem <borut.razem AT siol.net>
2695
2696         * support/scripts/inc2h.pl: WIN32 port
2697
2698 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2699
2700         * device/lib/makefile.in: added abs.c and labs.c
2701
2702 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2703
2704         * device/include/stdint.h: added
2705         * device/lib/abs.c: added
2706         * device/lib/labs.c: added
2707         * device/include/stdlib.h: added abs() and labs() prototypes
2708         * device/lib/libsdcc.lib: added abs and labs
2709         * device/include/float.h,
2710         * device/lib/_fsmul.c,
2711         * device/lib/printf_fast.c,
2712         * device/lib/printf_tiny.c: updated comments
2713
2714 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2715
2716         * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2717         bug #1164313
2718
2719 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2720
2721         * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2722         * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2723
2724 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2725
2726         * device/lib/printf_large.c: removed inline assembly for portability and
2727           readability. Use printf_fast if speed or size are more important.
2728         * src/pic16/gen.c: removed conditions around use of DEBUGpc
2729         * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2730
2731 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2732
2733         * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2734         prevent compiler warning
2735
2736 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2737
2738         * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2739         moved to level 0 and declared as static. Also they are explicit
2740         placed in access bank. This was necessery because some times they
2741         might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2742         * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2743         optimizations. Currently only compare to unsigned char is implemented,
2744         * src/pic16/gen.c: added fReturnIdx array,
2745         * (struct resolvedIfx) is moved to gen.h and made public,
2746         * (struct _G): added sregsAlloc and sregsAllocSet fields,
2747         * (aopForSym): added an optimization to directly store in stack of
2748         the operand of a SEND iCode,
2749         * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2750         but as registers instead (AOP_REG) using the fReturnIdx array,
2751         * (pic16_freeAsmop): remove the freed register from the
2752         _G.sregsAlloc field,
2753         * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2754         a compare of 'WREG',
2755         * (pic16_popGetTempRegCond): changed function prototype, now
2756         function takes also a bitVector argument v which holds the current
2757         set of registers that are allocated for stack access by aopForSym,
2758         registers allocated in aopForSym for accessing stack symbols are not
2759         any more part of the functions usedRegs field,
2760         * (genCall): some times aopOp is called for a stack variable to be
2761         send, aopForSym might perform the push, if this is true make sure
2762         that genCall doesn't push the variable twice by testing _G.resDirect,
2763         * (genFunction): changed testing for unspecified interrupt number
2764         from 256 to INTNO_UNSPEC,
2765         * modified selection scheme of frame pointer generation. Previously
2766         if function did use local registers a frame pointer was generated,
2767         now a frame pointer is generated only if function has arguments
2768         (that need PLUSW2 register access), or has stack arguments, or the
2769         compiler is not instructed to omit the frame pointer,
2770         * (genEndFunction): before restoring local registers that were saved
2771         in the function preamble, also restore the registers that *might*
2772         have been allocated for stack access,
2773         * (genRet): removed some old comments,
2774         * (genCmp, the active (RN's) version): added a call to the
2775         pic16_genCmp_special function to perform the compare with a more
2776         robust and optimized way,
2777         * (genInline): a feature has been added in inline code generation,
2778         which allows a wildcard variable substitution when writing inline
2779         assembly. Code is incomplete and experimental therefore undocumented,
2780         * (genCast): changed order of aopOp for result and right to allow
2781         aopForSym to directly load the result if possible,
2782         * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2783         perform an optimized compare on some selected special occasions,
2784         * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2785         * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2786         generate an IVT any more,
2787         * src/pic16/main.c (pic16_optionsTable): added command line option
2788         --optimize-cmp,
2789         * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2790         macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2791         macros,
2792         * src/pic16/NOTES: Raphael Neider added in list of active developers
2793         * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2794         jumptable_end to prevent bug #,
2795         * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2796         inCond and outCond fields,
2797         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2798         * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2799         turn off register spilling,
2800         * (packRegsForOneUse): synced with other ports' versions although it
2801         is not used currently,
2802         * (pic16_packRegisters): added an optimization while reading
2803         structure bitfields, some registers may be saved (malloc code is
2804         decreased by 80 bytes)
2805
2806 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2807
2808         * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2809         left is a bitfield, if yes, then don't optimize assignment. Perhaps
2810         this can be optimized more?
2811
2812 2005-03-10 Raphael Neider <rneider AT web.de>
2813
2814         * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2815           genNearPointerGet): (hopefully) fixed access to bitfields via
2816           pointers (p->bitN = x; and x = p->bitN; failed)
2817
2818 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2819
2820         * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2821
2822 2005-03-09 Raphael Neider <rneider AT web.de>
2823
2824         * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2825
2826 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2827
2828         * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2829         * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2830           (regTypeNum): set REG_BIT type if necessary
2831         * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2832         * support/regression/tests/critical.c: check bug 1144613
2833
2834 2005-03-02 Raphael Neider <rneider AT web.de>
2835
2836         * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2837
2838 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2839
2840         * src/avr/ralloc.c (serialRegAssign),
2841         * src/ds390/ralloc.c (serialRegAssign),
2842         * src/hc08/ralloc.c (serialRegAssign),
2843         * src/mcs51/ralloc.c (serialRegAssign),
2844         * src/pic/ralloc.c (serialRegAssign),
2845         * src/pic16/ralloc.c (serialRegAssign),
2846         * src/xa51/ralloc.c (serialRegAssign),
2847         * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2848
2849 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2850
2851         * src/SDCCast.c (decorateType): fixed bug 1124787
2852
2853 2005-02-20 Hubert Sack <sack AT digiplan.de>
2854         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2855
2856         * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2857         patch #1121755
2858
2859 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2860
2861         * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2862         to keep the correct label reference count when adding/removing references
2863         to labels. A peephole file using this is appended to patch #1144962.
2864
2865 2005-02-14 Raphael Neider <rneider AT web.de>
2866
2867         * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
2868         * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
2869         * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
2870           retrievals of result operand's value on assignment
2871
2872 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
2873
2874         * device/include/pic16/string.h: modified prototype for memccpy()
2875         to memccpy(void *, void *, char, size_t)
2876         * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
2877         check whether to omit frame pointer or not,
2878         * (genInline): convert all occurences of "\n" to LF in inline
2879         assembler blocks, this helps formatting the inline text,
2880         * (pic16_loadFSR0): modified prototype,
2881         * (genNearPointerGet, genNearPointerSet): reorganization of code,
2882         removed some 8051 legacy code,
2883         * (genPackBits): enabled handling bitfields exceeding one byte in size,
2884         * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
2885         before allocating temporary registers in functions,
2886
2887 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
2888
2889         * support/regression/tests/bitvars.c: corrected the "fix"
2890
2891 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
2892
2893         * support/regression/tests/bitvars.c,
2894         * support/regression/tests/bitwise.c,
2895         * support/regression/tests/rotate.c: "fixed" problems on Alpha
2896
2897 2005-02-10 Raphael Neider <rneider AT web.de>
2898
2899         * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
2900           different size for Alpha
2901         * src/pic16/gen.c (genCmpEq) : improved compare with 0
2902
2903 2005-02-09 Raphael Neider <rneider AT web.de>
2904
2905         * src/SDCC.lex(doPragma) : save and restore warning options as well
2906           (also added new stack plus clone- and copyAndFreeSDCCERRG())
2907         * have #pragma less_pedantic set the errorlevel to WARNING
2908           (fixes #1117001)
2909         * (cloneOptimize) : fixed wrong malloc's size
2910         * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
2911           facilitate correct handling of #pragma (save|restore)
2912
2913 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
2914
2915         * src/mcs51/gen.c: removed non-standard C nameless struct/union
2916
2917 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
2918
2919         * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
2920
2921 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
2922
2923         * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
2924
2925 2005-02-02 Raphael Neider <rneider AT web.de>
2926
2927         * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
2928         * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
2929         * (pic16_storeForReturn): fixed to allow returning function pointers
2930         * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
2931         * device/include/pic16/{stddef.h,stdbool.h}: added
2932
2933 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
2934
2935         * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
2936
2937 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
2938
2939         * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
2940         * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
2941          appeared to be required
2942
2943 2005-01-31 Borut Razem <borut.razem AT siol.net>
2944
2945         * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
2946           include/mcs51 and include/z80 directories to the package
2947
2948 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2949
2950         * src/hc08/gen.c (genFunction): fixed bug #1112752
2951
2952 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2953
2954         * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
2955
2956 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2957
2958         * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
2959
2960 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
2961
2962         * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
2963
2964 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
2965
2966         * device/include/c8051fxxx.h: removed these 6 files
2967         * device/include/mcs51/c8051fxxx.h: added these 11 new files
2968
2969 2005-01-26 Raphael Neider <rneider AT web.de>
2970
2971         * src/pic16/gen.c (genAssign): fixed assignment from longs
2972           in codespace (were cut to three bytes)
2973         * (genDummyRead): implemented (except for CODESPACE...),
2974           fixed bug #1108575
2975         * src/pic16/glue.c (emitStatistics): beautified
2976         * device/lib/pic16/libm/Makefile: added include path
2977
2978 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2979
2980         * src/z80/gen.c (aopPut): fixed bug #1103902
2981
2982 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2983
2984         * device/lib/expf.c: fixed bug #1095792
2985
2986 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
2987
2988         * device/lib/pic16/libm: added Math library sources
2989
2990 2005-01-24 Raphael Neider <rneider AT web.de>
2991
2992         * src/pic16/pcode.h: added second memory operand to pCodeOpReg
2993           to enable upcast to pCodeOpReg2 (there is no type tag to
2994           differenciate the two and pic16_popGet2p cast into PCOR2)
2995         * src/pic16/main.c (_process_pragma): fixed another malloc bug
2996           (sizeof(sectNames) changed to sizeof(sectName))
2997           Both patches fix segfaults under MinGW.
2998
2999 2005-01-23 Raphael Neider <rneider AT web.de>
3000
3001         * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3002           Safe_[mc]?alloc()'ed variables
3003         * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3004           of (byte sized) temporaries (assign them to WREG for now)
3005         * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3006           (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3007           this might fix SIGSEGVs on MinGW...
3008         * src/SDCCopt.c (killDeadCode): restored original behaviour
3009           (volatile operands might get thrown away though)
3010
3011 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3012
3013         * src/pic16/gen.c: fixed bug #1106975,
3014         * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3015         pointer update, INTCON is saved, global interrupts are disabled and
3016         restored after updateing TOS.
3017         * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3018         * added function attribute 'shadowregs' to take advantage of shadow
3019         registers,
3020         * added function attribute 'wparam' as an alternative to the wparam
3021         pragma,
3022         * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3023         user declares a non-ISR function as 'shadowregs',
3024         * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3025
3026 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3027
3028         * .version: bumped version number to 2.4.8
3029         * device/lib/pic16/pics.all: list of PIC18F devices supported by
3030         pic16 port,
3031         * device/lib/pic16/libio/i2c/: I2C module support library,
3032         * device/include/pic16/i2c.h: I2C support library header,
3033         * device/lib/pic16/libc/stdio/: standard IO support sources,
3034         * (printf_small.c): printf_small() source, supports float print,
3035         * (printf_tiny.c): printf_tiny() source, does not support floats,
3036         * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3037         enable global optimizations for entire library source, other
3038         Makefiles in the source tree are also modified to reflect this,
3039         * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3040         function,
3041         * doc/sdccman.lyx: updated to reflect new changes,
3042         * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3043         sym->onStack if-case,
3044         * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3045         sbit, idata, _idata, xdata, _xdata,
3046         * added pragma library, to link an external library, (see doc),
3047         * removed command line options, --pomit-config-words, --pomit-ivt,
3048         --pleave-reset-vector,
3049         * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3050         when calling assembler to reflect memory model used, also define
3051         macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3052         reflect stack model used,
3053         * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3054         on stack return NULL,
3055
3056 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3057
3058         * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3059           of the operands is volatile. Fixes #1020220
3060
3061 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3062
3063         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3064         * (OptimizeRegUsage): make sure that there is really no other flow where
3065           the first pCode is used
3066
3067 2005-01-22 Raphael Neider <rneider AT web.de>
3068
3069         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3070           to fix #1106967 (pCode->seq are not set up correctly)
3071
3072 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3073
3074         * src/SDCCglue.c (glue): make sure code area is declared before the
3075         static initialization area.
3076
3077 2005-01-21 Raphael Neider <rneider AT web.de>
3078
3079         * device/lib/Makefile.in: fixed test for pic16 install dir
3080         * device/lib/pic16/*/Makefile*: modified compile flags to enable
3081           optimizations
3082         * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3083           added --optimize-goto compiler switch and pragma wparam documentation
3084         * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3085         * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3086           and PRODH closing bug #1071770 (peephole optimizer)
3087
3088 2005-01-19 Raphael Neider <rneider AT web.de>
3089
3090         * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3091           cmdLine buffers (used when calling sdcpp...) are large enough
3092           (MAX_PATH=256 truncates arguments leading to system halts when
3093           used in MinGW...)
3094         * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3095         * (genUminus): rewritten to for efficiency
3096         * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3097           used uninitialized in some cases)
3098         * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3099           copy the third byte from the int -- now assumes 0x80 (data memory)
3100         * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3101           operands (genAddLit expects the iCode's operands to swapped as
3102           well), fixed leftover bytes (crashed for short left operands)
3103         * (pic16_genMinusDec): performance improvements, removed false
3104           PIC14 emitSKPNCs
3105         * (pic16_genMinus): fixed to cope with differently sized operands
3106         * src/pic16/glue.c (pic16_glue): added new banksel optimization
3107           for --obanksel > 1
3108         * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3109         * src/pic16/graph.[ch]: implementation of directed graphs, used by
3110           new banksel optimization
3111         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): prevented
3112           analysis for temporary registers (segfaults...)
3113         * src/pic16/peeph.def: added rule
3114
3115 2005-01-18 Vangelis Rokas <vrokas AT otenet.gr>
3116
3117         * device/lib/pic16/libc/stdlib/x_ftoa.c: it defines x_ftoa function
3118         which converts a float number to its ASCII representation
3119         * device/lib/pic16/libc/utils/cnvfrac.S,cnvint.S: support
3120         functions to convert the fractional and integer part of a float to ASCII,
3121         * device/lib/pic16/libc/stdlib/(calloc.c,free.c, malloc.c,
3122         realloc.c): added _MALLOC_SPEC to explicit place variables in data
3123         ram
3124         * device/include/asm/pic16/features.h: added _CODE, _DATA, _AUTOMEM,
3125         _STATMEM macros,
3126         * device/include/pic16/adc.h: added GPL info,
3127         * src/pic16/gen.c (genIfxpCOpJump): perform an genIfxJump but using
3128         a pCodeOp as tested operand,
3129         * (genNearPointerGet): optimized bit testing, does not use
3130         intermediate register for bit value, test directly instead with
3131         BTFSS, BTFSC, works only for single bits,
3132         * (genpic16Code): dump the name of the iCode in the asm,
3133         * src/pic16/ralloc.c (decodeOp): removed static declaration and
3134         renamed to pic16_decodeOp,
3135         * (serialRegAssign): do not allocate a temporary register for iCode
3136         sequences that test a single bit for 1/0
3137
3138 2005-01-12 Vangelis Rokas <vrokas AT otenet.gr>
3139
3140         * src/pic16/pcode.[ch]: introduced pic16_stackpnt_*,
3141         pic16_framepnt_*, pic16_stack_*, pic1_frame_* pointer variables to
3142         access stack and frame pointers. They are initially assigned to
3143         point at pic16_pc_fsr1[lh] and pic16_pc_fsr2[lh] variables and other
3144         accessing SFRs. Updated all occurences of modification of stack or
3145         frame pointer in gen.c and pcode.c,
3146         * src/pic16/ralloc.c (serialRegAssign): fixed two bugs with
3147         assigning of a literal value to pointers,
3148         * src/pic16/main.c (pic16_finiliseOptions): set pre-processor define
3149         flag STACK_MODEL_SMALL or STACK_MODEL_LARGE according to the model
3150         selected
3151
3152 2005-01-11 Vangelis Rokas <vrokas AT otenet.gr>
3153
3154         * doc/sdccman.lyx: update documentation about stack pragma, added
3155         some info for stack memory models
3156
3157 2005-01-08 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3158
3159         * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
3160
3161 2005-01-08 Raphael Neider <rneider AT web.de>
3162
3163         * src/pic16/device.c (pic16_dump_usection): changed naming scheme for
3164           udata sections to fix bug #1097823
3165
3166 2005-01-05 Raphael Neider <rneider AT web.de>
3167
3168         * src/pic16/gen.c (genGenericShift): added handling of differently
3169           sized left operand and result
3170
3171 2005-01-04 Raphael Neider <rneider AT web.de>
3172
3173         * src/pic16/gen.c (genIfxJump): fixed inverted skips on CARRY
3174         * (genIfx): fixed (?) read from uninitialized SPIL_LOC (now assumes CARRY
3175           to hold the condition bit)
3176         * added new version of genCmp (old code available via #define)
3177         * added new version of genShiftLeft/genShiftRight in a generic
3178           way, now supports shifting by negative values
3179         * (genLeftShiftLiteral, genRightShiftLiteral): use absolute value of
3180           shiftCount (expected by genGenericShift)
3181         * src/pic16/genarith.c (genPlus): added code for adding CARRY+literal
3182         * src/pic16/pcode.c (pic16_OptimizeJumps): removed annoying statistics
3183           dump
3184         * (pic16_newpCodeOpLit): changed to cast to unsigned char (as e.g. -32766
3185           is an invalid literal too...)
3186
3187 2005-01-04 Vangelis Rokas <vrokas AT otenet.gr>
3188
3189         * src/pic16/gen.c (aopForSym, genEndFunction): applied some fixes
3190         from Raphael Neider,
3191         * src/pic16/pcode.c (pic16_newpCodeOpLit): removed casting to char
3192         for 8-bit literals. This fixes some literal operands which are sign
3193         extended to 16-bits ints when instruction needs only 8-bits.
3194
3195 2004-12-31 Paul Stoffregen <paul AT pjrc.com>
3196
3197         * device/lib/logf.c: added mcs51 assembly version
3198         * device/lib/expf.c: added mcs51 assembly version
3199         * device/lib/_logexpf.c: new shared asm code for expf and logf
3200         * device/include/math.h: add defines for assembly math library
3201         * device/lib/Makefile.in: build new _logexpf.c
3202         * device/lib/libfloat.lib: use new _logexpf.c
3203
3204 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3205
3206         * src/pic/device.c
3207         * src/pic/pcode.c : adjusted internal stack and pre-allocated registers for
3208           device types which have less than 0x7f registers.
3209
3210 2004-12-29 Slade Rich <slade_rich AT users.sourceforge.net>
3211
3212         * src/pic/genarith.c : Fixed problem with subtraction where the result would not be updated when borrowing.
3213
3214 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3215
3216         * device/lib/printf_fast.c: only build on supported arch.
3217         * device/lib/printf_tiny.c: only build on supported arch.
3218         * device/lib/printf_fast_f.c: only build if asm float lib
3219         * device/lib/_fsget1arg.c: only build if asm float lib
3220         * device/lib/_fsget2args.c: only build if asm float lib
3221         * device/lib/_fsnormalize.c: only build if asm float lib
3222         * device/lib/_fsreturnval.c: only build if asm float lib
3223         * device/lib/_fsrshift.c: only build if asm float lib
3224         * device/lib/_fsswapargs.c: only build if asm float lib
3225         * device/include/stdio.h: don't provide print_fast,
3226           print_fast_f, print_tiny prototypes if --xstack used
3227
3228 2004-12-28 Maarten Brock <sourceforge.brock AT dse.nl>
3229
3230         * device/lib/sincosf.c (sincosf): don't invert bit/bool by ~
3231         * support/regression/ports/mcs51-stack-auto/spec.mk: added new _fs.. files
3232           to the SOURCES
3233
3234 2004-12-28 Paul Stoffregen <paul AT pjrc.com>
3235
3236         * device/lib/printf_fast_f.c: same as printf_fast, but
3237           with floating point enabled
3238         * device/lib/printf_fast.c: minor tweaks
3239         * device/include/stdio.h: add printf_fast_f
3240
3241 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3242
3243         * src/SDCCmain.c: make --float-reent default for mcs51
3244         * device/lib/_fsadd.c: added mcs51 assembly version
3245         * device/lib/_fssub.c: added mcs51 assembly version
3246         * device/lib/_fsmul.c: added mcs51 assembly version
3247         * device/lib/_fsdiv.c: added mcs51 assembly version
3248         * device/lib/_fseq.c: added mcs51 assembly version
3249         * device/lib/_fsneq.c: added mcs51 assembly version
3250         * device/lib/_fsgt.c: added mcs51 assembly version
3251         * device/lib/_fslt.c: added mcs51 assembly version
3252         * device/lib/_fscmp.c: shared code for fseq,fsgt,fslt,fsneq
3253         * device/lib/Makefile.in: add _fscmp to build
3254         * device/lib/libfloat.lib: add _fscmp to build
3255
3256 2004-12-27 Paul Stoffregen <paul AT pjrc.com>
3257
3258         * device/lib/_fs2slong.c: added mcs51 assembly version
3259         * device/lib/_fs2sint.c: added mcs51 assembly version
3260         * device/lib/_fs2schar.c: added mcs51 assembly version
3261         * device/lib/_fs2ulong.c: added mcs51 assembly version
3262         * device/lib/_fs2uint.c: added mcs51 assembly version
3263         * device/lib/_fs2uchar.c: added mcs51 assembly version
3264         * device/lib/_slong2fs.c: added mcs51 assembly version
3265         * device/lib/_sint2fs.c: added mcs51 assembly version
3266         * device/lib/_schar2fs.c: added mcs51 assembly version
3267         * device/lib/_ulong2fs.c: added mcs51 assembly version
3268         * device/lib/_uint2fs.c: added mcs51 assembly version
3269         * device/lib/_uchar2fs.c: added mcs51 assembly version
3270         * device/include/float.h: added #define to select asm vs c
3271
3272 2004-12-26 Paul Stoffregen <paul AT pjrc.com>
3273
3274         * device/lib/printf_fast.c: improvements to float output
3275         * device/include/float.h: add defines for assembly float library
3276         * device/lib/_fsget1arg.c: receive 1 float arg
3277         * device/lib/_fsget2args.c: receive 2 float args (reentrant)
3278         * device/lib/_fsnormalize.c: normalize a float
3279         * device/lib/_fsreturnval.c: return float, various helper routines
3280         * device/lib/_fsrshift.c: right shift a float's mantissa
3281         * device/lib/_fsswapargs.c: swap 2 floats
3282         * device/lib/Makefile.in: build these 6 new files for mcs51
3283         * device/lib/libfloat.lib: add these 6 files to the library
3284
3285 2004-12-26 Borut Razem <borut.razem AT siol.net>
3286
3287         * sim/ucsim/avr.src/arith_inst.cc: fixed bug #1088372- savr is not
3288           built by gcc 3.4.2
3289
3290 2004-12-25 Paul Stoffregen <paul AT pjrc.com>
3291
3292         * device/lib/printf_tiny.c: printf for mcs51 in only 267 bytes,
3293           and fully reentrant and register bank neutral.
3294         * device/lib/printf_fast.c: added float (not enabled by default),
3295           added compact/slower integer (also not enabled by default),
3296           improved size/speed of fast integer code, other minor changes
3297         * device/include/stdio.h, device/lib/Makefile.in,
3298           device/lib/libsdcc.lib: integrate printf_tiny into mcs51 build
3299
3300 2004-12-24 Maarten Brock <sourceforge.brock AT dse.nl>
3301
3302         * src/pic16/pcode.c: declaring variables other than at the start of a
3303           block is not supported in C by VC6.
3304
3305 2004-12-22 Vangelis Rokas <vrokas AT otenet.gr>
3306
3307         * applied a previous patch from Raphael Neider that wasn't included
3308         in the previous commits, which fixes infinite loops within jumptable
3309         improvements,
3310         * made some fixes that previous patches introduced
3311
3312 2004-12-21 Vangelis Rokas <vrokas AT otenet.gr>
3313
3314         * src/pic16/gen.c (pic16_aopGet): applied fix from Raphael Neider
3315         that fixes an issue with AOP_PCODE asmop's offset,
3316         * (pic16_popCopyReg): update instance field too,
3317         * (mov2w): modified to pic16_mov2w because it conflicts with mov2w
3318         function of pic port,
3319         * (genCmp, genAnd, genAssign),
3320         * src/pic16/genarith.c (genAddLit): some fixes from Raphael Neider,
3321
3322 2004-12-20 Vangelis Rokas <vrokas AT otenet.gr>
3323
3324         * src/SDCCast.c (gatherAutoInit): allow pic16 to emit static
3325         variables initial values to idata section,
3326         * src/SDCCicode.c (geniCodeCall): patch from ### to fix unreferenced
3327         variables in some functions. This utilizes parmBytes field of iCode
3328         structure to hold the offset of the variable in stack. (might be
3329         able to use the stack field too?)
3330         * applied patch from Raphael Neider # ### , # ###
3331         * src/pic16/glue.c (pic16emitRegularMap): fix to print static
3332         variable initial values in idata section,
3333         * src/pic16/ralloc.c (pic16_allocDirReg): don't allocate register
3334         for static variables with initial value
3335         * src/device/lib/pic16/libsdcc/float/ulong2fs.c (__ulong2fs):
3336         applied fix in while loop from Raphael Neider.
3337
3338 2004-12-19 Maarten Brock <sourceforge.brock AT dse.nl>
3339
3340         * src/ds390/gen.c (genCpl): fixed bit=~(char/bit) bugs, added warning
3341         * src/ds390/main.c (_ds390_regparm): don't pass bit params in registers
3342         * src/ds390/ralloc.c (serialRegAssign): spill bits
3343         * src/mcs51/gen.c (genCpl): fixed bit=~(char) bugs, added warning
3344         * support/Util/SDCCerr.c,
3345         * support/Util/SDCCerr.h: added warning W_COMPLEMENT for using bit=~(bit)
3346         * support/regression/tests/bitvars.c: added tests for bitwise complement(~)
3347         * support/regression/tests/bitwise.c: added test for bitwise complement(~)
3348
3349 2004-12-09 Maarten Brock <sourceforge.brock AT dse.nl>
3350
3351         * device/include/sdcc-lib.h: inserted LGPL, added includes
3352           asm/ds390/features.h and asm/mcs51/features.h
3353         * device/include/asm/default/features.h,
3354         * device/include/asm/gbz80/features.h,
3355         * device/include/asm/z80/features.h: added empty _AUTOMEM
3356           and _STATMEM
3357         * device/include/asm/ds390/features.h,
3358         * device/include/asm/mcs51/features.h: added files with defines for
3359           _AUTOMEM and _STATMEM indicating automatic and static storage class
3360         * device/lib/printf_large.c (_print_format): optimized & used _AUTOMEM
3361         * doc/sdccman.lyx: version 2.4.7, updated xstack documentation
3362         * src/SDCCicode.c (geniCodeCast),
3363         * src/SDCCsymt.c (compareType): allow cast of data-ptr to idata-ptr
3364         * src/SDCCloop.c (loopInduction): removed unused variable lr
3365         * src/SDCCopt.c (convilong, convertToFcall): moved "easy special case"
3366           to convertToFcall to include char modulo (RFE 1065037), added check
3367           if left operand is unsigned and use abs of literal value
3368         * src/SDCCpeeph.c (setFromConditionArgs): removed double quotes option
3369           as it doesn't work after conversion from peephole.def to peephole.rul
3370         * src/mcs51/gen.c (toBoolean): added check for size,
3371           (genModOneByte): optimized code for signed char modulo a literal
3372           power of 2 (thanks to Hubert Sack),
3373           (genRRC): removed unnecessary "clr c",
3374           (genRLC): replaced "add a,acc" with cheaper "rlc a"
3375         * src/mcs51/peeph.def: renamed 115 to 115.a, added rule 115.b: another
3376           jump optimization,
3377           swapped rules 256.c and 256.d,
3378           extended 256.d by using new multiple checks (thanks Erik),
3379           added rules 256.e and 256.f,
3380           updated rule 261.a and 261.b to new generated code
3381         * support/regression/tests/muldiv.c: added test div/mod by a power of 2
3382
3383 2004-12-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3384
3385         * src/SDCCloop.c (basicInduction, loopInduction): fixed several
3386           induction related bugs, including first part of bug #1074377
3387
3388 2004-12-05 Vangelis Rokas <vrokas AT otenet.gr>
3389
3390         * applied patch from bug-report #1076292,
3391         * applied patches for genAnd and Goto-optimizations for Raphael
3392         Neider,
3393         * src/SDCCicode.c (printOperand): fixed !REGA source to compile and
3394         dump a less iCode information,
3395         * src/pic16/device.h (pic16_options_t): added field debgen,
3396         * src/pic16/gen.h: added macros DUMP_FUNCTION_ENTRY,
3397         DUMP_FUNCTION_EXIT, FENTRY, FENTRY2,
3398         * src/pic16/gen.c (my_powof2): renamed to pic16_my_powof2 and made
3399         puclic,
3400         * (various functions): added macros FENTRY and FENTRY2 to functions,
3401         to emit function prologue,
3402         * (various functions): fixed indentation,
3403         * (genNearPointerGet): fixed loading of FSR0,
3404         * (genPackBits): applied patch from Raphael Neider to fix updating
3405         of FSR0 and touching only the modified bits,
3406         * src/pic16/genarith.c (various functions): added macros FENTRY to
3407         emit function prologue in comments,
3408         * src/pic16/pcode.h: added functions debugf2, debugf3,
3409         * src/pic16/ralloc.c: partial fix for packForPush caused
3410         segmentation fault,
3411
3412 2004-12-04 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3413
3414         * src/mcs51/peeph.def: added 261.a,b (16 bit rotate) by Stas Sergeev
3415           <stsp AT users.sourceforge.net> with reversed byte order
3416         * support/regression/tests/rotate.c: added (ds390 skips some tests)
3417
3418 2004-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3419
3420         * src/z80/gen.c (genLeftShift, genRightShift): fixed second part of
3421           bug #1074377
3422         * src/hc08/gen.c (genrshFour, shiftRLong, shiftLLong),
3423         * src/mcs51/gen.c (shiftLLong): Fixed some shifting bugs Frieder found
3424
3425 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3426
3427         * src/pic/pcode.c : fixed a problem where banksel was not being inserted.
3428
3429 2004-12-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3430
3431         * src/SDCCpeeph.c (callFuncByName): support combined peephole rule
3432           conditions,
3433           (setFromConditionArgs): friendly operand parser for peephole rules,
3434           (operandBaseName, operandsNotRelated): new peephole condition
3435           "operandsNotRelated" -- similar to "operandsNotSame", but takes
3436           architecture specific register naming into account, handles n-way
3437           comparisons, and supports quoted literals
3438         * src/mcs51/peeph.def: restored rule 177.d with an extra condition
3439
3440 2004-12-02 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3441
3442         * src/mcs51/peeph.def: fixed bug #1076940
3443
3444 2004-12-02 Slade Rich <slade_rich AT users.sourceforge.net>
3445
3446         * device/include/pic/pic16f877.h : added an include file for the PIC16F877 device.
3447
3448 2004-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3449
3450         Adding support for replacing ljmps with sjmps in jumptables
3451         generated for switch statements. For now you need to set the
3452         environment variable SDCC_SJMP_JUMPTABLE to enable this.
3453         Now 4 algorithms for mcs51 jumptable generation are used:
3454         ljmp or sjmp jumptables for up to 16 cases, stack-pushing target
3455         addresses loaded pc-relative for up to 112 cases and stack-pushing
3456         target addresses loaded with offset from dptr for up to 256 cases.
3457
3458         * src/SDCCpeeph.c: added peephole conditional labelJTInRange
3459         * src/mcs51/main.c: adapted constants for switch table generation
3460         * src/mcs51/peeph.def: added 260.x for replacing ljmp with sjmp
3461
3462 2004-11-26 Maarten Brock <sourceforge.brock AT dse.nl>
3463
3464         * device/lib/printf_large.c (_print_format): fixed bug 1073386
3465         * support/regression/tests/bug1057979.c: added test for bug 1073386
3466
3467 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3468
3469         * src/pic16/pcode.c: fixed bug which may produce error in non-GNU
3470         compilers
3471
3472 2004-11-25 Vangelis Rokas <vrokas AT otenet.gr>
3473
3474         * src/pic16/device.h,
3475         * src/pic16/genarith.c,
3476         * src/pic16/glue.c,
3477         * src/pic16/main.c,
3478         * src/pic16/pcode.c: applied patches #1068154 and #1070213
3479
3480 2004-11-24 Vangelis Rokas <vrokas AT otenet.gr>
3481
3482         Large cummulative patch for pic16 port.
3483         * device/lib/pic16/gstack.h: NEW, user can specify its own handler
3484         to call when a stack overflow occurs,
3485         * (malloc.h): added CVS Id tag,
3486         * (pic18f{242,252,442,452}.h): added T0CONbits structure and
3487         variable,
3488         * added libc directory. The current version of LibC contains string
3489         functions, ctype functions and macros and some functions of the
3490         stdlib set (like malloc/free/atof/atoi etc...). All functions are to
3491         be extensively tested in the future. Standard disclaimer here.
3492         Library is not automatically build yet. But one can build it by
3493         invoking 'make' inside the libc directory.
3494         * added ADC library under libio. Preliminary version yet.
3495
3496         * src/pic16/gen.h: added emitTOGC macro, to toggle Carry flag,
3497         * src/pic16/gen.c (aopForRemat): asmop size is filled by
3498         aopForRemat() now and not by pic16_aopOp(),
3499         * (pic16_popGetTempReg): removed warning messgae when allocating
3500         temporary registers, its a buggy feature and will be removed,
3501         * (pic16_popGet): set register instance field in AOP_CRY,
3502         * (pic16_outBitC): fixed for results in size greater than 1,
3503         * (genUminusFloat): fixed for pic16, ported code from mcs51,
3504         * (pic16_storeForReturn): optimized return of 0,
3505         * (genCmp): experimental code for new genCmp which uses PIC18's
3506         special compare&skip instructions. Initial tests fail some times
3507         with variables grater than 1 byte in size, so new code is disabled,
3508         * (genUnpackBits, genPackBits): more optimizations in reading/writing,
3509         a single bit,
3510         * (genCast): began a fix to optimize the casting of a bit to another
3511         bit, now assigning a bitfield to another bitfield will fail, sorry,
3512         * src/pic16/main.c: disabled the use of lr-support feature,
3513         * src/pic16/pcode.h: renamed PCASMDIR to PCAD,
3514         * added some function prototypes, added function _debugf prototype,
3515         * src/pic16/pcode.c: (pic16_get_op): fixed emitting operands of register
3516         bits with offset (case PO_GPR_BIT),
3517         * (genericPrint): don't emit INFO pcode when --pcode-verbose not in
3518         command line,
3519         * (isBankInstruction): modified to return 0 for no banking instruction,
3520         and 1 for banking instruction,
3521         * (pic16_isPCinFlow): check for PCAD (assembler directives) too,
3522         caused stop processing pCodes after a inline assembly block,
3523         * (pic16_popCopyGPR2Bit): updated to match bitfields with offset,
3524         * src/pic16/pcoderegs.c: fixed a bug with eliminating some temporary
3525         registers when it shouldn't,
3526         * src/pic16/ralloc.c (allocReg): add preliminary support for
3527         supporting a limited set of temporary registers,
3528
3529 2004-11-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3530
3531         * src/hc08/gen.c (genAssign, genPointerGetSetOfs, genDataPointerGet,
3532           genDataPointerSet): ensure assignments always copy in MSB to LSB
3533           order,
3534           (loadRegFromAop): recognize CLRH optimization,
3535           (genFunction): optimize RECEIVE iCodes in reentrant functions
3536
3537 2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3538
3539         * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
3540           --out-fmt-s19 turning into --out-fmt-elf if s19 was already
3541           selected.
3542         * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
3543         * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
3544           contiguous with data
3545
3546 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3547
3548         * device/lib/_gptrget.c (_gptrget),
3549         * device/lib/_gptrgetc.c (_gptrgetc),
3550         * device/lib/_gptrput.c (_gptrput): _naked allows to use ret
3551           instead of sjmp to ret
3552         * src/mcs51/peeph.def: added peepholes 3.d-g and 177.g,h provided
3553           by Hubert Sack <hsack2002 AT arcor.de> in RFE #1067986, thanks
3554
3555 2004-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
3556
3557         * .version: bumped version to 2.4.7
3558         * device/lib/_gptrget.c (_gptrget): is now _naked
3559         * device/lib/_gptrgetc.c (_gptrgetc): is now _naked
3560         * device/lib/_gptrput.c (_gptrput): is now _naked
3561         * src/SDCCast.c (createBlock): removed ridiculous self-assignment,
3562           (createFunction): fixed xstack
3563         * src/SDCCglue.c (emitMaps): set allocation required for bit area
3564         * src/SDCCicode.c (geniCodeCast): don't change SPEC_OCLS for literal
3565           or bit either,
3566           (geniCodeCritical): store original interrupt state in an iTemp bit
3567           var unless stack-auto
3568         * src/SDCCicode.h: added CRITICAL and ENDCRITICAL to SKIP_IC2
3569         * src/SDCCmain.c (setIncludePath): added include/target to search path
3570         * src/SDCCmem.c (allocParms): store bit vars in bit space, not overlay
3571         * src/SDCCsymt.c (checkFunction): don't check regbank for isr's against
3572           prototype,
3573           (processFuncArgs): put bit vars in bit area
3574         * src/mcs51/gen.c (saveRegisters, unsaveRegisters, genXpush, saveRBank,
3575           unsaveRBank): fixed xstack,
3576           (genFunction): bugfix: replaced (global!) reentrant with fReentrant,
3577           (genFunction, genEndFunction): fixed xstack,
3578           (genAssign): optimization don't walk backwards through mem
3579         * src/mcs51/main.c (_mcs51_regparm): don't pass bit params in registers
3580         * src/mcs51/ralloc.c (createStackSpil): spill bits to bit area
3581         * support/regression/Makefile: also make library (for stack-auto) when
3582           making "all" and added "test-mcs51-xstack-auto"
3583         * support/regression/fwk/lib/testfwk.c: added T2_isr prototype for mcs51
3584         * support/regression/ports/mcs51/T2_isr.c: added this file as a stub
3585         * support/regression/ports/mcs51/fwk.lib: added to link T2_isr stub
3586         * support/regression/ports/mcs51/spec.mk: added rules for fwk.lib
3587         * support/regression/ports/mcs51-stack-auto/spec.mk: replaced
3588           make-library by MAKE_LIBRARY
3589         * support/regression/ports/mcs51-xstack-auto/spec.mk: file added to run
3590           regression tests for xstack
3591         * support/regression/tests/bitvars.c: test for bit vars (bug 938782)
3592         * support/regression/tests/critical.c: test for critical on mcs51
3593
3594 2004-11-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3595
3596         * support/regression/ports/ucz80/spec.mk: use include and lib files from
3597           built version of sdcc instead of installed version
3598
3599 2004-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
3600
3601         * src/mcs51/gen.c (toBoolean): fixed bug 1065458
3602         * device/lib/Makefile.in: z80 uses printf_large.c, sprintf.c and
3603           vprintf.c now
3604         * device/lib/printf_large.c (calculate_digit): fixed bug 1057979
3605         * device/lib/z80/Makefile: don't use printf.c as it fails bug 1057979
3606           WARNING: remove device/lib/build/z80/printf.o by hand when
3607           updating from previous build!
3608         * device/lib/z80/printf.c: updated comment
3609         * support/regression/tests/bug1057979.c: test all ports now
3610         * support/regression/tests/bug1065458.c: file added
3611
3612 2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3613
3614         * src/z80/gen.c (genFunction, genEndFunction): avoided generating
3615           *_start and *_end symbols for static functions
3616
3617 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
3618
3619         * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
3620           and search crt0.o in all library paths,
3621           (setIncludePath): proper handling of --nostdinc,
3622           (setLibPath): proper handling of --nostdlib
3623         * support/regression/Makefile,
3624         * support/regression/ports/ds390/spec.mk,
3625         * support/regression/ports/gbz80/spec.mk,
3626         * support/regression/ports/hc08/spec.mk,
3627         * support/regression/ports/mcs51/spec.mk,
3628         * support/regression/ports/mcs51-large/spec.mk,
3629         * support/regression/ports/mcs51-stack-auto/spec.mk,
3630         * support/regression/ports/z80/spec.mk: use include and lib files from
3631           built version of sdcc instead of installed version
3632         * doc/sdccman.lyx: fixed typo in --nostdinc
3633
3634 2004-11-10 Slade Rich <slade_rich AT users.sourceforge.net>
3635
3636         * src/pic/pcode.c,
3637         * src/pic/device.c,
3638         * src/pic/ralloc.c,
3639         * src/pic/gen.c : added support to generate code for struct bit fields.
3640
3641 2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
3642
3643         * as/xa51/xa_version.h,
3644         * device/include/errno.h,
3645         * device/include/regc515c.h,
3646         * device/lib/_itoa.c,
3647         * device/lib/_ltoa.c,
3648         * device/lib/ser_ir_cts_rts.c,
3649         * sim/ucsim/xa.src/glob.cc,
3650         * sim/ucsim/xa.src/inst_gen.cc,
3651         * sim/ucsim/xa.src/xa_bit.cc,
3652         * sim/ucsim/xa.src/xa_sfr.cc,
3653         * sim/ucsim/z80.src/inst_dd.cc,
3654         * sim/ucsim/z80.src/inst_fdcb.cc,
3655         * support/scripts/keil2sdcc.pl,
3656         * src/pic16/pic16.dsp,
3657         * src/pic16/pic16a.dsp: corrected cvs line endings
3658         * device/lib/printf_large.c: fixed bug 1057979
3659         * src/pic16/gen.c: fixed non-C standard code
3660         * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
3661         * src/SDCCglobl.h: changed pack_iram to no_pack_iram
3662         * support/regression/ports/mcs51/support.c: reload T1 asap
3663         * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
3664           pdata use and clear idata startup behaviour
3665         * support/regression/tests/bug1057979.c: added
3666
3667 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
3668
3669         * device/examples/ds390/ow390/ad26.h,
3670         * device/examples/ds390/ow390/cnt1d.h,
3671         * device/examples/ds390/ow390/crcutil.c,
3672         * device/examples/ds390/ow390/ownet.h,
3673         * device/examples/ds390/ow390/owsesu.c,
3674         * device/examples/ds390/ow390/swt12.h,
3675         * device/examples/ds390/ow390/swtoper.c,
3676         * device/examples/ds390/ow390/temp10.h,
3677         * device/examples/ds390/ow390/thermodl.c,
3678         * device/examples/ds390/tinitalk/tinitalk.dsp,
3679         * device/examples/ds390/tinitalk/tinitalk.dsw,
3680         * device/examples/mcs51/clock/hw.h,
3681         * device/examples/mcs51/simple2/go.bat,
3682         * device/examples/serialcomm/windows/serial.h,
3683         * device/examples/xa51/dummy.c,
3684         * device/examples/xa51/hello.c,
3685         * device/include/80c51xa.h,
3686         * device/include/at89x051.h: corrected cvs line endings
3687
3688 2004-11-04 Vangelis Rokas <vrokas AT otenet.gr>
3689
3690         * src/pic16/main.c (options): added command line --gstack, to trace
3691         stack over/under flows,
3692         * added pragma 'wparam' to allow passing first byte of function
3693         parameters via WREG, syntax is #pragma wparam my_function[, func2...]
3694         * src/pic16/gen.c (pic16_testStackOverflow): function which emits a
3695         call to __gstack_test function and sets up the symbol as extern,
3696         * (pic16_pushpCodeOp, pic16_poppCodeOp, pushw, pushaop, popaopidx,
3697         * popaop): added call to pic16_testStackOverflow,
3698         * (wParamCmp, inWparamList): NEW, test existence of a symbol in
3699         wparamList list,
3700         * (genCall, genPcall): now all parameters are passed via stack
3701         except in functions that are pass to wparam pragma in which WREG is
3702         used too,
3703         * (genPcall): REENTRANT flag is checked to see if variable prototype
3704         contains reentrant keyword, don't call a non-reentrant function, via
3705         a reentrant function pointer or vice versa, functions are never
3706         passed via WREG,
3707         * (genJumpTab): applied patch from bug #1057478 by R.Neider and
3708         D.Winkler,
3709         * src/pic16/glue.c (pic16emitRegularMap): fixed bug which caused a
3710         SIGSEGV when accessing a NULL register stucture,
3711         * (pic16_printGPointerType): modified to handle UPPER modifier for
3712         function initializers, changed prototype of function to simpler one,
3713         * (pic16_printIvalFuncPtr): check to see if function is already
3714         added in externs list,
3715         * src/pic16/pcoderegs.c (pCodeOptime2pCodes): fixed bug which
3716         optimized a move from W to SFR with a move to the same register
3717         later after a CALL,
3718         * device/lib/pic16/debug: NEW directory, contains debug features
3719         which are enabled when linking with libdebug.lib, currently command
3720         line option --gstack enables stack pointer tracing for over/under
3721         flow, corresponding sources are in debug/gstack
3722
3723 2004-10-30 Vangelis Rokas <vrokas AT otenet.gr>
3724
3725         * doc/sdccman.lyx: updated SDCC version,
3726         * (PIC16 port): update list of command line options,
3727         * src/pic16/device.h (structure pic16_options_t): added field gstack
3728         to enable stack overflow tracing on push/pops,
3729         * src/pic16/device.c (statistics structure): added statistics
3730         structure,
3731         * (pic16_dump_access, pic16_dump_usection, pic16_dump_gsection,
3732         pic16_dump_int_registers): increase statistics counters for each
3733         * variable which is encountered
3734         * (pic16_dump_usection): emit each .udata variable to its own udata
3735         section,
3736         * src/pic16/gen.c (assignResultValue, genCall, genPcall, genFunction):
3737         when macro USE_WREG_IN_FUNC_PARAMS is set to 0 pass all function
3738         parameters via stack, otherwise use old scheme,
3739         * src/pic16/glue.c (pic16_emitStatistics): dump statistics in
3740         assembler output file,
3741         * src/pic16/main.c: added command line options --gstack to enable
3742         push/pop tracing for stack overflow,
3743         * src/pic16/pcode.c (all pCodeInstruction records for PIC18F
3744         instructions): added size of each instruction,
3745         * (pic16_countInstruction): estimate size of instructions in
3746         the_pFile list, inline assembly blocks are not counted,
3747         * (pic16_FixRegisterBanking): trace previous register usage, when
3748         banksel optimizations is greater than 0, don't emit a redudant
3749         banksel directive,
3750
3751 2004-10-26 Slade Rich <slade_rich AT users.sourceforge.net>
3752
3753         * src/pic/ralloc.c : fixed inefficient code produced when compiling a complimented bit operation.
3754         * src/pic16/ralloc.c : applied same fix for pic16.
3755         * src/pic/gen.c : tidied it up a little.
3756
3757 2004-10-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3758
3759         * src/mcs51/peeph.def: disabled 259.a,b for removing redundant ret,
3760         thanks to Martin Helmling for reporting (mail on sdcc-devel 2004-10-25)
3761
3762 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3763
3764         * src/SDCCast.c (reverseParms): fixed bug #1040577 (part 2)
3765
3766 2004-10-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3767
3768         * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the
3769         non-reentrant function __modsint in the interrupt function (thus
3770         corrupting math operations during serial I/O)
3771         * device/lib/ser_ir.c: as above, changed buffersize
3772         * src/mcs51/peeph.def: added 259.a,b for removing redundant ret,
3773         256.c,d for zeroing
3774         * doc/Makefile: added option -t for rsync
3775
3776 2004-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3777
3778         * src/SDCCast.h (struct ast),
3779         * src/SDCCast.c (reverseParms, copyAst): fixed bug #1040577 (part 1)
3780
3781 2004-10-20 Borut Razem <borut.razem AT siol.net>
3782
3783         * support/scripts/sdcc.nsi: added include/pic16/*.h to the setup
3784         package
3785
3786 2004-10-20 Vangelis Rokas <vrokas AT otenet.gr>
3787
3788         * device/lib/pic16/libsdcc/Makefile: added lregs directory in
3789         makefile targets,
3790         * device/lib/pic16/libsdcc/lregs/{Makefile,lrst.c,lrrest.c}: NEW
3791         support functions to replace long sequences of MOVFF's from access
3792         bank registers to stack and vice versa,
3793         * src/pic16/device.h: added new field opt_flags, where optimization
3794         flags can be set to enable certain features,
3795         * src/pic16/gen.c (pic16_emitpinfo): NEW to add PC_INFO pCode in
3796         * pBlock, (genFunction, genEndFunction): surroung loop for
3797         saving/loading used registers in stack with PC_INFO pCodes,
3798         INF_LREGS. Code in between can then be optimized by pCode optimizer
3799         to support function calls,
3800         * (genDataPointerSet): fixed bug which loaded float fields in
3801         structures with corrupt data,
3802         * src/pic16/genutils.c (debugf, _debugf): macro/function which emits
3803         in a standard way debug info on stderr. Feature used for developing
3804         and debugging only,
3805         * src/pic16/glue.c (pic16glue): reformatted, deleted some old and
3806         obsolete chunks of code,
3807         * if optimization flag OF_LR_SUPPORT was set, call pic16_OptimizeLocalRegs,
3808         * src/pic16/main.c (_pic16_parseOptions): added handler for --flr-support,
3809         * pic16/src/pcode.c (pic16_newpCodeInfo,
3810         * (pic16_newpCodeOpLocalRegs),
3811         * (pic16_convertLocalRegs2Support): NEW, to support new optimization
3812         feature,
3813         * (pic16_pCodeConstString): printing of the initial value of a
3814         symbol as a comment is inhibited since parsing was already done by
3815         copyStr and output is corrupt,
3816         * (pic16_pCode2str, genericPrint): handle PC_INFO pCode,
3817
3818 2004-10-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3819
3820         * src/mcs51/ralloc.c (packRegisters): fixed bug #1044601
3821
3822 2004-10-19 Maarten Brock <sourceforge.brock AT dse.nl>
3823
3824         * as/mcs51/lkarea.c: removed old K&R style,
3825           (lnksect): changed check on boundary error,
3826           (lnksect2): changed check on boundary error,
3827           (lnksect2): extend XSTK to end of page if size = 1
3828         * as/mcs51/lkmain.c: removed old K&R style,
3829           (Areas51): create l_IRAM symbol
3830         * as/mcs51/lkmem.c (summary2): added report on PSEG and XSTK
3831         * device/lib/Makefile.in: renamed model-mcs51-reentrant to
3832           model-mcs51-stack-auto, added model-mcs51-xstack-auto
3833         * device/lib/_mullong.c: added version to be compiled with xstack
3834         * device/lib/mcs51/crtclear.asm: clear only upto --iram-size
3835         * device/lib/mcs51/crtxclear.asm: clear pdata as well
3836         * device/lib/mcs51/crtxstack.asm: fixed comment
3837         * src/SDCCglue.c: maxInterrupts defaults to 0,
3838           (emitMaps): added pdata,
3839           (createInterruptVect): (re)moved default,
3840           (glue): added pdata,
3841           (glue): moved __start__xstack to XSTK with default size 1
3842         * src/SDCCmain.c (parseCmdLine): automatically set options.intlong_rent
3843           and options.float_rent when options.stackAuto is set,
3844           (linkEdit): only write XDATA_NAME if provided on command line
3845         * src/SDCCmem.h,
3846         * src/SDCCmem.c: added pdata
3847         * src/port.h: added pdata_name to PORT
3848         * src/mcs51/gen.c (toBoolean): fixed for Acc use of aopGet,
3849           (saveRegisters, unsaveRegisters): removed usage of B,
3850           (genMinus): fixed accumulator clash,
3851           (genJumpTab): added comment, this needs another look
3852         * src/mcs51/gen.c: added check for "B in use" paranoia,
3853           added pushB() and popB()
3854         * src/mcs51/peeph.def: restart after 177.c so 177.a can get a second
3855           chance
3856         * src/avr/main.c,
3857         * src/ds390/main.c,
3858         * src/hc08/main.c,
3859         * src/mcs51/main.c,
3860         * src/pic/main.c,
3861         * src/pic16/main.c,
3862         * src/xa51/main.c,
3863         * src/z80/main.c: (reset_regparms) made void parameter explicit and
3864           added PSEG (PAG,XDATA) or NULL to port specifier
3865         * src/ds390/main.c (_ds390_genIVT): moved implemented default in here
3866         * src/mcs51/main.c (_mcs51_genIVT): moved implemented default in here,
3867           (_mcs51_genInitStartup): removed __start__xstack equ,
3868           (mcs51_port): moved xstack from XSEG (XDATA) to XSTK (PAG,XDATA)
3869         * src/pic16/device.c (pic16_dump_usection, pic16_dump_isection),
3870         * src/z80/gen.c (_rleAppend): fixed warnings
3871         * support/regression/tests/zeropad.c: added pdata test
3872         * .version: bumped to 2.4.6
3873
3874 2004-10-17 Borut Razem <borut.razem AT siol.net>
3875
3876         * support/scripts/sdcc.nsi: cross compiling of WIN32 setup.exe on Linux
3877         as a part of nightly build
3878
3879 2004-10-16 Vangelis Rokas <vrokas AT otenet.gr>
3880
3881         * src/pic16/gen.c (struct _G): added field useWreg, is set to 1 when
3882         WREG holds the first byte function parameters,
3883         * (aopForSym): take special case for symbols which are in FARSPACE
3884         but in CODESPACE too,
3885         * (assignResultValue): modified to take into account _G.useWreg,
3886         * (genCall): don't use wreg for parameter passing when function is
3887         declared as reentrant, too, added optimization INCF to stack
3888         pointer when stack parameter count is 1,
3889         * (genFunction, genEndFunction): refurnished and fixed to not using
3890         wreg for passing parameters when function has varargs or is
3891         reentrant, fixed bug with symbol name compare for generating
3892         functions in absolute address,
3893         * (pic16_storeForReturn): refurnished,
3894         * (genCmp): began writing a new version of the function, not ready
3895         yet, therefore it is disabled,
3896         * (genAssign): do not read code memory when assigning a function to
3897         a pointer function,
3898         * src/pic16/glue.c (pic16emitStaticSeg): abSym->name is defined an
3899         array of characters, not pointer,
3900         * (pic16initialComments): in debug mode emit an .ident directive for
3901         the assembler,
3902         * (_process_pragma): emit a new warning type (internal to pic16)
3903         when setting stack to default length, emit a similar warning when
3904         placing a function at absolute address and address is not word aligned
3905         * (_pic16_parseOptions): added 'return TRUE' statement,
3906         * (_pic16_linkEdit): if compiling a source, then add the source's
3907         file object, first in the list of objects to link,
3908
3909 2004-10-13 Slade Rich <slade_rich AT users.sourceforge.net>
3910
3911         * src/pic/pcoderegs.c : increased count on regUsedinRange to prevent unnecessary warning.
3912         * src/pic/main.c : removed VC warning.
3913         * src/pic/gen.c : changed comment.
3914
3915 2004-10-12 Vangelis Rokas <vrokas AT otenet.gr>
3916
3917         * device/lib/pic16/libsdcc/gptr/gptrput[234].c: an external
3918         reference to a deprecated symbol _GPTRREG was causing failure to
3919         link. Thanks G. M. Gallant for the info.
3920
3921 2004-10-12 Slade Rich <slade_rich AT users.sourceforge.net>
3922
3923         * src/pic/pcode.c : Applied a code patch supplied by Paul Ashmore in
3924         comments for Bugs item #954788.
3925
3926 2004-10-10 Vangelis Rokas <vrokas AT otenet.gr>
3927
3928         * src/pic16/device.c (pic16_dump_gsection,
3929         * pic16_groupRegistersInSection): handle symbols declared to be in
3930         access bank differently,
3931         * src/pic16/gen.c (struct _G): added field resDirect,
3932         * (aopForSym): if symbol on stack and iCode is '=' and result exists,
3933         send values read from stack directly to result and don't allocate
3934         temporary values,
3935         * (pic16_sameRegs): fixed bug that allowed MOVFF to move between
3936         same registers,
3937         * (pic16_sameRegsOfs): NEW,
3938         * (freeAsmop): if _G.resDirect is set then do not mark registers as
3939         free because they were not allocated from temporary pool,
3940         * pic16_popRegFromString): workaround to fix a problem with
3941         allocating variables twice or never,
3942         * (genGenPointerGet): using PRODL instead of FSR0H,
3943         * (genGenPointerSet): using POSTDEC1 (that is a stack location)
3944         instead of FSR0H,
3945         * (genAssign): take advantage of the _G.resDirect flag,
3946         * (genCast): around line 11844, use mov2f instead of directly
3947         MOVFF'ing between operands to account for literal values,
3948         * src/pic16/genutils.c: some new debug functions for gpsim have been
3949         added,
3950         * src/pic16/glue.c (pic16_printIvalType): fixed bug that initialized
3951         float with integer part only,
3952         * src/pic16/main.c (_process_pragma): handle pragma udata access to
3953         place variables in access bank
3954         * device/lib/pic16/libsdcc/gptr/gptr*.c: using BRA instead of GOTO,
3955         updated sources to reflect recent changes in gen.c
3956
3957 2004-10-06 Vangelis Rokas <vrokas AT otenet.gr>
3958
3959         * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning
3960         sources that searched for headers in installation path, now the
3961         device/include/pic16 is used,
3962         * src/pic16/glue.c (pic16glue),
3963         * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or
3964         .line directives if not in debug mode, this suppresses assembler's
3965         warnings for ignored directives
3966
3967 2004-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
3968
3969         * src/port.h: made reset_regparms prototype void parameter explicit.
3970         * src/SDCCsymt.c (processFuncArgs): removed argument "func".
3971         * src/mcs51/ralloc.c (packRegisters): new fix for bugs 898889 & 979599.
3972         * doc/sdccman.lyx: documented warning disabling and how to use
3973           printf_large to make it print floats.
3974         * device/include/stdbool.h: NEW
3975         * device/lib/_atof.c,
3976         * device/lib/_divuint.c,
3977         * device/lib/_divulong.c,
3978         * device/lib/expf.c,
3979         * device/lib/printf_large.c,
3980         * device/lib/sincosf.c,
3981         * device/lib/sincoshf.c: used stdbool.h, all compile with stack-auto now
3982         * device/lib/Makefile.in: added target for model-mcs51-reentrant to build
3983           a completely reentrant lib.
3984
3985 2004-10-05 Vangelis Rokas <vrokas AT otenet.gr>
3986
3987         * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements
3988         * device/include/pic16/stdio.h: fixed bug with colon
3989
3990 2004-10-03 Vangelis Rokas <vrokas AT otenet.gr>
3991
3992         * device/include/pic16/stdio.h,
3993         * device/include/pic16/stdlib.h,
3994         * device/include/pic16/math.h: NEW
3995         * device/lib/pic16/libsdcc/gptr/*.c (gptrget*, gptrput*): functions
3996         declared as _naked to reduce overhead
3997         * device/lib/Makefile.in (target port-specific-objects-pic16):
3998         changed * to *.* so to ignore the CVS directory,
3999         * src/pic16/gen.c (pic16_freeAsmop): added code to store result of
4000         stacked variables back in stack,
4001         * (genEndFunction): fixed bug reported by G.M. Gallant with stack
4002         corruption
4003
4004 2004-10-01 Vangelis Rokas <vrokas AT otenet.gr>
4005
4006         * .version: bumped version number to 2.4.5
4007         * support/Util/SDCCerr.h: added warning W_POSSBUG2.
4008         * support/Util/SDCCerr.c (messages structure): added entry for
4009         W_POSSBUG2
4010
4011         Large cumulative patch for pic16 port and libraries.
4012         * device/include/pic16/sdcc-lib.h,
4013         * device/include/pic16/stdarg.h,
4014         * device/include/asm/pic16/features.h,
4015         * device/include/lib/pic16/libsdcc/gptr/{*.c, Makefile}: NEW,
4016         * device/include/pic16/float.h: changes reentrant keyword with
4017         _FS_REENTRANT, added prototype for __fsneq, included sdcc-lib.h
4018         * device/lib/pic16/libsdcc/Makefile: added target directory gptr,
4019         updated target build-libraries to include objects from gptr,
4020         * device/lib/pic16/libsdcc/{char,int,long}/*.c: added macro
4021         _IL_REENTRANT to all function headings, included sdcc-lib.h header,
4022         * device/lib/pic16/libsdcc/float/*.c: added macro _FS_REENTRANT to
4023         all function headings,
4024         * src/SDCCmain.c: added global parameter userIncDirsSet,
4025         * (parseCmdLine): when option -I is encountered add directory to
4026         userIncDirsSet too,
4027         * src/version.awk: added space between control and long,
4028         * src/pic16/NOTES: added some notes for the port,
4029         * src/pic16/gen.c: added prototype for mov2fp function,
4030         * (fReturnpic16[]): properly named return value registers,
4031         * (_G structure): added fields stackRegSet, fregsUsed, stack_lat,
4032         * (aopForSym): added code to handle symbols with onStack flag set,
4033         symbols onStack are allocated PTRSIZE bytes,
4034         * (aopFreeAsmop): handles special case where asmops are stack objects,
4035         * (aopGet, pic16_popGet): adde cod to handle new asmop AOP_STA,
4036         * (pic16_popGetTempReg, pic16_popGetTempRegCond, pic16_popReleaseTempReg):
4037         added argument lock to trace flaws in allocating temporary registers
4038         when developing port,
4039         * (pic16_popGetLit, pic16_popGetLit2): changed lit from unsigned to signed
4040         * (pic16_popRegFromString): reenabled allocating a direct register
4041         from string,
4042         * (assignResultValue): various beautifications,
4043         * fixed bug #1037717 (patch from R. Neider & D. Wrinkler) with mistaken
4044         referenced function argument,
4045         * (genIpush): reenabled to allow stacked arguments, handles only
4046         ic->parmPush iCodes,
4047         * (genCall, genPcall): major changes to allow for variable argument
4048         functions, fixed a bug with falsely restoring stack pointer after
4049         returning from call,
4050         * (genFunction): pending code for critical function,
4051         * (shiftR1Left2ResultSigned, shiftR1Left2Result, shiftL2Left2Result,
4052         * (shiftR2Left2Result, shiftLLong) applied patch #1032155 from R.Neider,
4053         * (genNearPointerGet): fixed bug with indirect reading, was always
4054         reading from INDF0
4055         * (genGenPointerGet, genGenPointerSet): rewrote to support generic
4056         pointers,
4057         * (genAddrOf): rewrote code to take address of a stacked function parameter
4058         * (genCast): fixed casting to generic pointer type,
4059         * src/pic16/gen.h: added AOP_STA,
4060         * (struct asmop): added field stk,
4061         * src/pic16/genarith.c (pic16_AopType): handle AOP_STA,
4062         * (pic16_genPlusIncr): changed emitSKPNZ to emitSKPNZ,
4063         * (pic16_genAddLit, pic16_genPlus): applied patch #1034042 by tecodev,
4064         * (pic16_genMinus): fixed bug #1035119 with patch submitted by tecodev,
4065         * src/pic16/genutils.c (pic16_genNot): removed symbol *tlbl,
4066         * src/pic16/glue.c (pic16_printGPPointerType): fixed to support new
4067         generic pointers,
4068         * src/pic16/main.c (_pic16_initPaths): ignores default SDCC include
4069         and library paths,
4070         * (pic16_port structure): generic pointer size is set to 3,
4071         * src/pic16/pcode.c (pic16_newpCodeOpLit): correctly print literal integer,
4072         * (insertBankSwitch): cast to (char *) to prevent 64bit CPUs'
4073         compiler warning,
4074         * src/pic16/ralloc.c (allocReg): prevent allocating register when
4075         operand is an iTemp,
4076
4077 2004-09-24 Martin Helmling <mh AT octo-soft.de>
4078
4079         * debugger/mcs51/cmd.c: set PC if a symbol at pc reg is set
4080         * debugger/mcs51/simi.c: addapt new syntax of s51
4081
4082 2004-09-23 Vangelis Rokas <vrokas AT otenet.gr>
4083
4084         * src/pic16/genutils.c (pic16_genNot): fixed bug #1032265,
4085         * src/pic16/pcode.c: commented out some calls to free() in order to
4086         fix bug #989576,
4087
4088 2004-09-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4089
4090         * src/SDCCicode.h,
4091         * src/SDCCicode.c (isiCodeInFunctionCall),
4092         * src/avr/ralloc.c (selectSpil),
4093         * src/pic/ralloc.c (selectSpil),
4094         * src/pic16/ralloc.c (selectSpil),
4095         * src/ds390/ralloc.c (selectSpil),
4096         * src/hc08/ralloc.c (selectSpil),
4097         * src/xa51/ralloc.c (selectSpil),
4098         * src/mcs51/ralloc.c (selectSpil): Don't use remainSpil to spill to the
4099         stack in the middle of a function call sequence (fixes bug #1020268)
4100         * src/SDCCicode.c (geniCodeJumpTable): fixed error in computing the
4101         costs associated with the minimum switch case.
4102
4103 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4104
4105         * src/SDCC.lex: fixed bug #1030549
4106
4107 2004-09-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4108
4109         * src/SDCCcse.h (struct cseDef),
4110         * src/SDCCcse.c (cseBBlock, newCseDef, ifFromAddrTaken): purge CSEs
4111         over a function call if the CSE is derived from a symbol whose
4112         address has been taken (fixes bug #1029883)
4113         * support/regression/tests/bug-1029883: a new regression test for
4114         this bug
4115
4116 2004-09-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4117
4118         * src/hc08/gen.c (emitinline): fixed bug #1029778
4119         * src/SDCC.y (assignment_expr): fixed the grammer so that assignment
4120         to a cast object is no longer a syntax error ("fixes" bug #1030006,
4121         and starts toward RFE #905167)
4122
4123 2004-09-17 Vangelis Rokas <vrokas AT otenet.gr>
4124
4125         * src/pic16/gen.c (mov2f): New function to move an operand to
4126         another without considering if it is a literal or a register,
4127         * (pic16_sameRegs): don't check if they are both AOP_REG,
4128         * (AccRsh): removed andmask=0 lines,
4129         * (genLeftShift): duplicated to be improved in future versions,
4130         * src/pic16/main.c (_process_pragma): emit stack default size in hex,
4131         * src/pic16/pcode.c: added POC_INFSNZW, updated inverted_op fields
4132         in POC_INCFSZ, POC_INCFSZW, POC_INFSNZ,
4133         * (pic16initMnemonics): added initialization for POC_INFSNZW,
4134         * (insertBankSwitch): fixed inserting banksel directives algorithm
4135         for instructions that follow a skip instruction, this fixes a report
4136         for broken subtraction code generation,
4137         * src/pic16/ralloc.c (deassignLRs): do not free register if current
4138         iCode is a left op, just in case result and right share the same
4139         registers
4140
4141 2004-09-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4142
4143         * src/hc08/main.c,
4144         * src/hc08/gen.c (genJumpTable): more efficient jump table, supports
4145         preservation of HX
4146         * src/hc08/gen.c (pullRegs): fixed order of HX & XA pairs
4147         * src/mcs51/ralloc.c (packRegisters): removed the patch applied
4148         on 2004-09-12; it was buggy
4149
4150 2004-09-15 Bernhard Held <bernhard AT bernhardheld.de>
4151
4152         * src/SDCCsymt.h: removed RESULT_CHECK
4153         * src/SDCCast.c,
4154         * src/SDCCglue.c,
4155         * src/SDCCval.c,
4156         * src/pic/glue.c,
4157         * src/pic16/glue.c: replaced RESULT_CHECK with RESULT_TYPE_NONE
4158
4159 2004-09-15 Vangelis Rokas <vrokas AT otenet.gr>
4160
4161         * src/SDCCicode.c (piCode): applied patch from Raphael Neider,
4162         * src/pic16/device.c (pic16_assignConfigWordValues): wrong
4163         configuration values no more rejected by compiler, they are assigned
4164         to configuration registers with a warning message instead,
4165         * src/pic16/glue.c (pic16_emitConfigRegs): added +1 at top-limit of
4166         the for-loop so last conf register is emitted too,
4167         * (_pic16_initPaths): link library libsdcc.lib by default,
4168         * (_hasNativeMulFor): modified test for multiplication according to
4169         Raphael Neider's remarks. Integer multiplication is also done with
4170         support functions,
4171         * device/include/pic16/pic18fregs.h: corrected type error in while
4172         testing and including 18f6720 header file
4173
4174 2004-09-14 Vangelis Rokas <vrokas AT otenet.gr>
4175
4176         * src/pic16/device.h (pic16_options): removed field use_crt,
4177         * src/pic16/gen.c (genUnpackBits): added call to pic16_loadFSR0
4178         until an optimization to handle single bits is added,
4179         * (pic16_loadFSR0): moved before genUnpackBits,
4180         * (genAnd): some white lines removed,
4181         * src/pic16/main.c (_pic16_finaliseOptions): set omit_ivt and clear
4182         leave_reset flags in pic16_options when using crt modules,
4183
4184 2004-09-12 Maarten Brock <sourceforge.brock AT dse.nl>
4185
4186         * src/mcs51/ralloc.c (packRegisters): applied fix by Bernhard Held
4187           for bugs 898889 & 979599. Also used some safer print instructions.
4188
4189 2004-09-12 Vangelis Rokas <vrokas AT otenet.gr>
4190
4191         * src/pic16/device.h (pic16_options_t): added field use_crt,
4192         crt_name, no_crt,
4193         * src/pic16/genarith.c (pic16_genPlus): added an assert(0) line to
4194         catch a probable future bug,
4195         * src/pic16/gen.c: aopIdx function commented out,
4196         * (genAssign): commented out old code which used aopIdx,
4197         * src/pic16/glue.c (pic16glue): removed some legacy fragments of
4198         code, added if conditionals to take into account the --use-crt
4199         command line options,
4200         * src/pic16/main.c (pic16_optionsTable): added new command line
4201         options, --use-crt= and --no-crt,
4202         * (_pic16_linkEdit): now the proper crt object is added in the
4203         linker command line except than when --no-crt is specified,
4204         * src/pic16/pcode.c,
4205         * src/pic16/pcode.h: added some structures and functions for a new
4206         optimization scheme to compansate for instruction overhead between
4207         same iCodes, this scheme is currently under development and is not
4208         working in any way,
4209         * src/pic16/gen.c (genAnd): added patch provided by Aaron Collwell
4210         to && operator,
4211         * device/lib/pic16/startup/crt0i.c,
4212         * device/lib/pic16/startup/crt0iz.c: added global char variable
4213         __uflags to force the generation of an idata section
4214
4215 2004-09-12 Bernhard Held <bernhard AT bernhardheld.de>
4216
4217         * doc/Makefile,
4218         * doc/clean.mk: added support for easy creation of sdcc-doc.tar.bz2
4219         * doc/sdccman.lyx: updated sdcc version to 2.4.4
4220
4221 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4222
4223         * doc/sdccman.lyx: fixed a problem with my new index entries (thanks
4224         Frieder) and clarified the default code optimization mode
4225
4226 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4227
4228         * src/SDCC.lex (doPragma, process_pragma),
4229         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
4230         "opt_code_size", and "opt_code_balanced"
4231         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
4232         regrouped options by category, added support for category headers
4233         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
4234         and "--opt-code-size"
4235         * doc/sdccman.lyx: documented these new options and pragmas
4236         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
4237         preference into account
4238
4239 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4240
4241         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
4242           geniCodePreDec): Fixed bug 904237 by generating a warning
4243         * src/SDCCerr.h,
4244         * src/SDCCerr.c: added warning W_SIZEOF_VOID
4245
4246 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
4247
4248         * src/pic/device.c : When no max ram set validate full memory range.
4249         * src/pic/pcode.c,
4250         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
4251
4252 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
4253
4254         * device/lib/_gptrget.c,
4255         * device/lib/_gptrput.c: updated comment
4256         * device/lib/calloc.c,
4257         * device/lib/free.c,
4258         * device/lib/malloc.c,
4259         * device/lib/realloc.c: added LGPL, made them reentrant-safe
4260         * src/SDCCcse.c (cseBBlock),
4261         * src/SDCCicode.c (printOperand, geniCodeArray),
4262         * src/SDCCicode.h (struct operand): fixed bug 868103
4263         * support/regression/tests/bug-868103.c: added
4264         * src/SDCCast.c (searchLitOp),
4265         * src/SDCCcse.h (struct cseDef),
4266         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
4267         * src/SDCCicode.h (struct operand),
4268         * src/SDCCsymt.h (struct sym_link),
4269         * src/avr/gen.c (hasInc),
4270         * src/ds390/gen.c (hasInc),
4271         * src/hc08/gen.c (genPlusIncr, hasInc),
4272         * src/mcs51/gen.c (hasInc),
4273         * src/pic16/glue.c (pic16_printIvalChar),
4274         * src/pic16/ralloc.c (regWithIdx),
4275         * src/xa51/gen.c (hasInc) : removed warnings
4276         * src/SDCCast.c (createBlock): added comment ???
4277         * src/hc08/ralloc.c: updated comments
4278
4279 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4280
4281         * doc/sdccman.lyx: updated section on switch statements, added
4282         section about semaphore locking
4283         * doc/Makefile: added option -info for latex2html
4284         * device/lib/_gptrget.c,
4285         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
4286
4287 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4288
4289         * src/pic/device.h,
4290         * src/pic/device.c,
4291         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
4292          maxram is less than 0x100.
4293
4294 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
4295
4296         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
4297
4298 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4299
4300         * src/port.h,
4301         * src/mcs51/main.c,
4302         * src/ds390/main.c,
4303         * src/z80/main.c,
4304         * src/hc08/main.c,
4305         * src/pic/main.c,
4306         * src/pic16/main.c,
4307         * src/avr/main.c,
4308         * src/xa51/main.c
4309         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
4310         a jump table is the best form for a switch statement, including
4311         automatic insertion of missing cases to make the case range
4312         continuous. Developed in collaboration with Frieder Ferlemann.
4313
4314 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4315
4316         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
4317         accumulator result if it needs sign extension
4318
4319 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4320
4321         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
4322
4323 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4324
4325         * device/lib/gbz80/printf.c,
4326         * device/lib/z80/printf.c: removed define for NULL
4327
4328 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
4329
4330         * as/xa51/xa_link.c,
4331         * device/examples/ds390/ow390/ad26.c,
4332         * device/examples/ds390/ow390/cnt1d.c,
4333         * device/examples/ds390/ow390/counter.c,
4334         * device/examples/ds390/ow390/ds2480.h,
4335         * device/examples/ds390/ow390/ds2480ut.c,
4336         * device/examples/ds390/ow390/findtype.c,
4337         * device/examples/ds390/ow390/gethumd.c,
4338         * device/examples/ds390/ow390/owllu.c,
4339         * device/examples/ds390/ow390/ownetu.c,
4340         * device/examples/ds390/ow390/swt12.c,
4341         * device/examples/ds390/ow390/swtloop.c,
4342         * device/examples/ds390/ow390/temp.c,
4343         * device/examples/ds390/ow390/temp10.c,
4344         * device/examples/ds390/ow390/thermo21.c,
4345         * device/examples/ds390/ow390/tinilnk.c,
4346         * device/examples/ds390/ow390/tstfind.c,
4347         * device/examples/serialcomm/windows/serial.cpp,
4348         * device/examples/serialcomm/windows/test_serialcomm.cpp,
4349         * device/include/reg51.h: fixed line endings for cvs
4350
4351 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4352
4353         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
4354         packRegsForAccUse, packRegisters): new accumulator register
4355         packing algorithm
4356         * support/regression/ports/hc08/support.c (_putchar): suppress
4357         warning of unused variable
4358         * src/SDCCicode.c: added SWAP entry to codeTable
4359
4360 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
4361
4362         * device/lib/sprintf.c: forgot to add this file before previous commit
4363
4364 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
4365
4366         * src/pic16/gen.c (genPackBits): added operand right in function
4367         parameters, load result directly if p_type is POINTER (that is
4368         called by genNearPointerSet)
4369         * (genUnPackBits): added operand left in function parameters,
4370         * (genNearPointerGet, genNearPointerSet): prevent the loading of
4371         FSR0 if accessing bitfields,
4372
4373 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
4374
4375         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
4376           _print_format; updated printf, sprintf, vsprintf
4377         * device/include/asm/default/features.h: corrected comment/define
4378         * device/lib/Makefile.in: added sprintf.c
4379         * device/lib/libsdcc.lib: added sprintf module
4380         * device/lib/printf_large.c,
4381         * device/lib/vprintf.c,
4382         * device/lib/sprintf.c: totally refactored printf_large and vprintf
4383           into these 3 files
4384         * support/regression/Makefile: changed ALL_PORTS into a usefull default
4385         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
4386         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
4387           hc08 test
4388         * support/regression/tests/zeropad.c: define idata as data for hc08
4389
4390 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4391
4392         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
4393         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
4394         labels are referenced at least once (even if a reference is not found)
4395         * src/hc08/gen.c (emitcode): set isComment flag for comments
4396         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
4397         loads), rules 6a..6b (optimize jumps to return)
4398
4399 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4400
4401         * device/lib/acosf.c (acosf),
4402         * device/lib/asinf.c (asinf),
4403         * device/lib/atanf.c (atanf),
4404         * device/lib/ceilf.c (ceilf),
4405         * device/lib/cosf.c (cosf),
4406         * device/lib/coshf.c (coshf),
4407         * device/lib/cotf.c (cotf),
4408         * device/lib/fabsf.c (fabsf),
4409         * device/lib/floorf.c (floorf),
4410         * device/lib/log10f.c (log10f),
4411         * device/lib/logf.c (logf),
4412         * device/lib/sinf.c (sinf),
4413         * device/lib/sinhf.c (sinhf),
4414         * device/lib/sqrtf.c (sqrtf),
4415         * device/lib/tanf.c (tanf),
4416         * device/lib/tanhf.c (tanhf),
4417         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
4418         replaced all instances of "reentrant" in the library functions
4419         defined in math.h with this macro.
4420         * support/regression/tests/float_trans.c: reenabled test for hc08
4421
4422 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
4423
4424         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
4425         erroneously deleted
4426
4427 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4428
4429         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
4430         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
4431         multi-byte volatile operands are used
4432         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
4433         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
4434         initialization to area GSINIT0 so that it would always precede
4435         any static initializers in GSINIT
4436         * support/regression/tests/zeropad.c: fixed idata define for hc08
4437         * support/regression/tests/bug-927659.c,
4438         * support/regression/tests/float_trans.c: disabled tests for hc08
4439         pending missing library routines
4440         * .version: increased version number to 2.4.4 - hc08 port now passes
4441         regression tests
4442
4443
4444 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
4445
4446         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
4447         * Makefile.common.in,
4448         * as/Makefile,
4449         * as/hc08/Makefile.in,
4450         * as/mcs51/Makefile.in,
4451         * as/z80/Makefile.in,
4452         * debugger/mcs51/Makefile.in,
4453         * device/include/Makefile.in,
4454         * device/lib/Makefile.in,
4455         * doc/Makefile,
4456         * link/Makefile,
4457         * link/z80/Makefile.in,
4458         * packihx/Makefile.in,
4459         * sim/ucsim/main_in.mk,
4460         * sim/ucsim/avr.src/Makefile.in,
4461         * sim/ucsim/doc/Makefile.in,
4462         * sim/ucsim/gui.src/serio.src/Makefile.in,
4463         * sim/ucsim/hc08.src/Makefile.in,
4464         * sim/ucsim/s51.src/Makefile.in,
4465         * sim/ucsim/xa.src/Makefile.in,
4466         * sim/ucsim/z80.src/Makefile.in,
4467         * src/Makefile.in,
4468         * support/cpp2/Makefile.in,
4469         * support/librarian/Makefile,
4470         * support/makebin/Makefile: added DESTDIR to the install path proposed
4471         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
4472         * doc/sdccman.lyx: added DESTDIR documentation
4473
4474 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
4475
4476         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
4477         instruction for interrupt handlers, use fast returns when returning
4478         from high priority interrupts
4479
4480 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4481
4482         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
4483         code generation
4484         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
4485         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
4486         bugs, ported much of Bernhard's code from mcs51
4487         * src/mcs51/gen.c (genSend),
4488         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
4489         than one when calling a reentrant function
4490         * device/lib/_mullong.c: defined an alternate struct layout for big
4491         endian ports (hc08)
4492
4493 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4494
4495         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
4496         test
4497
4498 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4499
4500         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
4501         are sane and complete before asking the port its prefered parameter
4502         passing method (fixes bug #1017633)
4503         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
4504         and _ret3
4505
4506 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4507
4508         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
4509         problem in bitfields >= 8 bits.
4510
4511 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4512
4513         * src/SDCCsymt.c: undid changes that were not meant to be committed
4514
4515 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4516
4517         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
4518
4519 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
4520
4521         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
4522           copied and wrong bit got inverted
4523
4524 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4525
4526         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
4527         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
4528         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
4529         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
4530         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
4531         assignments to bitfields at known addresses
4532         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
4533         reads from bitfields at known addresses
4534         * src/hc08/ralloc.c (packRegisters),
4535         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
4536         genhc08Code): optimize pointer get values used as conditionals
4537         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
4538         and branch
4539
4540 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4541
4542         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
4543         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
4544         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
4545         as conditionals
4546
4547 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4548
4549         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
4550
4551 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4552
4553         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
4554         related problems
4555
4556 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
4557
4558         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
4559
4560 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4561
4562         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
4563         mcs51 port
4564
4565 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
4566
4567         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
4568
4569 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4570
4571         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
4572         cases use more compact code.
4573
4574 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
4575
4576         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
4577
4578 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4579
4580         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
4581
4582 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4583
4584         * src/SDCCsymt.h,
4585         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
4586         parameter of changePointer() from symbol* to sym_link*
4587         * src/SDCCast.c (decorateType): call changePointer() for CAST op
4588         * src/SDCCsymt.c (compareType): void* type is castable to other
4589         pointers, but not necesarily an exact match.
4590         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
4591         is no longer blindly treated as an exact match.
4592         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
4593
4594 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
4595
4596         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
4597
4598 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
4599
4600         * src/pic/gen.c,
4601         * src/pic/pcode.c,
4602         * src/pic/ralloc.h,
4603         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
4604
4605 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
4606
4607         * src/pic/device.c,
4608         * src/pic/device.h,
4609         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
4610
4611 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4612
4613         * src/mcs51/gen.c (emitcode): fixed bug #992819
4614
4615 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
4616
4617         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
4618           there's no need to make it worse
4619
4620 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4621
4622         * src/mcs51/ralloc.c (deassignLR),
4623         * src/ds390/ralloc.c (deassignLR),
4624         * src/hc08/ralloc.c (deassignLR),
4625         * src/z80/ralloc.c (deassignLR),
4626         * src/pic/ralloc.c (deassignLR),
4627         * src/pic16/ralloc.c (deassignLR),
4628         * src/avr/ralloc.c (deassignLR),
4629         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
4630         rlivePoint): fixed another part of bug #971834
4631
4632 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4633
4634         * src/z80/main.c: enabled "critical" keyword
4635         * src/z80/mappings.i,
4636         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
4637         functions (fixes bug #979646)
4638         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
4639
4640 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4641
4642         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
4643           such as c:\mydir.
4644
4645 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
4646
4647         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
4648           doesn't disable too much optimizations
4649
4650 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4651
4652         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
4653
4654 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
4655
4656         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
4657
4658 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
4659
4660         * src/pic/gen.c tidied up tabs
4661         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
4662         * src/pic/main.c tidied up tabs
4663         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
4664         * src/pic/pcoderegs.c tidied up tabs
4665         * src/pic/ralloc.c tidied up tabs
4666
4667 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
4668
4669         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
4670         to S_FIXED for pic16 port and when symbol is not in level 0,
4671         allocate for S_REGISTER storage class and pic16 port, too,
4672         * src/pic16/device.h: prototype for checkSym,
4673         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
4674         * (pic16_assignConfigWordValue): test the value and the mask to
4675         validate that the value is suitable for the configuration word,
4676         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
4677         collect extern declared symbols, don't emit symbol twice, check
4678         first if symbol is in publics set first,
4679         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
4680         * added command line '--fstack' which enables an experimental
4681         feature for stack access, too buggy to be used yet...
4682         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
4683         * (pic16_allocDirReg): when register has storage class S_REGISTER
4684         allocate in pic16_dynAccessRegs,
4685         * device/include/pic16/pic18f????.h: modified configuration word
4686         naming convention, words started as CONFIG0H but should be CONFIG1H
4687
4688 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
4689
4690         * device/include/mcs51reg.h: fixed bug 970993
4691
4692 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
4693
4694         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
4695         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
4696         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
4697         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
4698         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
4699         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
4700           error/warning numbers,
4701           added function setWarningDisabled()
4702         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
4703         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
4704           _memcmp.c _memmove.c calloc.c realloc.c free.c
4705         * support/regression/tests/malloc.c: added tests for new functionality
4706         * support/regression/tests/zeropad.c: added tests for truncated initializers
4707           and initialized char arrays starting with '\x0'
4708         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
4709
4710 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
4711
4712         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
4713
4714 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4715
4716         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
4717         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
4718         peephole 177.e. Thanks to anonymous
4719
4720 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
4721
4722         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
4723         function isn't used in the source but referenced as a
4724         variable initializer then declare it as extern in .asm file
4725
4726 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
4727
4728         * .version: increased version number to 2.4.3
4729
4730         Adding version extension according to ChangeLog CVS revision
4731         * src/Makefile.in (target all): added dependency 'version.h'
4732         * (rule version.h): added rule to create version.h from ChangeLog,
4733         * (rule dep): added dependency version.h,
4734         * src/version.awk: AWK script to create version.h
4735         * src/SDCCdwarf2.c (dwWriteModule),
4736         * src/SDCCglue.c (initialComments),
4737         * src/SDCCmain.c (printVersionInfo): modified to write after
4738         version string the version extension number,
4739         * src/SDCCutil.c: included "version.h"
4740         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
4741         number,
4742         * src/SDCCutil.h: added prototype for getBuildNumber
4743
4744         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
4745         includeDirsSet, too,
4746         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
4747         const char [] is found in function prototype...
4748
4749         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
4750         moving to WREG with source is already in WREG,
4751         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
4752         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
4753         * (aopForSym): stack'ed symbols are partially supported, added
4754         if-clause to support symbols in FARSPACE,
4755         * (sameRegs): added test for AOP_ACC to see if registers are same,
4756         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
4757         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
4758         * (pic16_popRegFromString): will not allocate a new register if it
4759         doesn't find one by name, bug may have introduced...
4760         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
4761         * (genIpush): revived to use pic16 port's stack,
4762         * (genAddrOf): added incomplete case for stack'ed operand,
4763         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
4764         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
4765         can handle multibyte operands,
4766         * src/pic16/glue.c (pic16_printIval*): some debug info added,
4767         * (pic16initialComments): added message for MPLAB compatibility
4768         mode enabled,
4769         * src/pic16/main.h: prototype for pic16_mplab_comp,
4770         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
4771         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
4772         * (_pic16_linkEdit): NEW, handles link stage, transferred here
4773         because of increased complexity of procedure,
4774         * (_process_pragma): stack pragma changed to format 'stack pos len',
4775         emit symbol '_stack_end' to conform with gplink,
4776         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
4777         to search for register,
4778         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
4779         PO_GPR_REGISTER,
4780         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
4781         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
4782         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
4783         case for PO_GPR_REGISTER,
4784         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
4785         dies, the new era is ahead !...
4786         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
4787         pic16_dynInternalRegs,
4788         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
4789         * (pic16_allocDirReg): minor optimizations and bug fixes,
4790         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
4791
4792         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
4793         load stack and frame pointer with address of 'stack_end' symbol
4794
4795 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
4796
4797         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
4798         without source code but only variable initializers
4799
4800 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
4801
4802         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
4803         external are not declared as extern to reduce overhead while linking
4804
4805 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
4806
4807         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
4808
4809 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
4810
4811         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
4812           Yee Keat for the patch
4813         * src/SDCCast.c (decorateType): fixed bug #979599
4814         * src/ds390/gen.h: removed local fReturnSizeDS390
4815         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
4816         * src/ds390/gen.c (genAnd, genOr, genXor),
4817         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
4818
4819 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
4820
4821         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
4822         add relFilesSet to $3, manipulate $2 to handle linking of object
4823         files without source files in command line,
4824         * device/include/pic16 (all headers): added ID location macros,
4825         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
4826         entries for ID location bytes,
4827         * (pic16_assignIdByteValue): NEW,
4828         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
4829         added field dumpcalltree to pic16_options_t,
4830         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
4831         is used instead of pic16_Gstack_base_addr, check if (ifx) before
4832         emitting rFalseIfx label after check_carry label,
4833         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
4834         pic16_emitDIRegs), NEW
4835         * (pic16glue): dump .calltree file when option --calltree found,
4836         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
4837         * (_pic16_genAssemblerPreamble): emit ID locations after
4838         configuration registers,
4839         * (pic16_linkCmd): modifications of the link command,
4840         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
4841         * (pic16_pCodeInitRegisters): don't init stack registers,
4842         * (pic16_findPrevInstruction): fixed bug,
4843         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
4844         bug with immediate registers,
4845         * (buildCallTree): traces stack push and pop,
4846         * (pct2): dump also stack usage for each function,
4847         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
4848         * (pic16_allocDirReg): various modifications,
4849         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
4850         fixed to 1,
4851
4852 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
4853
4854         * src/pic16/pcode.c: removed buggy double colon
4855
4856 2004-07-01 Borut Razem <borut.razem AT siol.net>
4857
4858         * support/scripts/sdcc.nsi: added include/pic16 to setup
4859
4860 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
4861
4862         * device/lib/Makefile.in: fixed bug in target objects-pic16,
4863         * device/lib/pic16/Makefile: prefixed with dash (-) command under
4864         target 'clean',
4865         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
4866         specific command line arguments. Also added sample lkr script
4867         for placing a variable at a specific memory bank.
4868         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
4869         at a specific memory bank,
4870         * (pic16_dump_isection): fixed bug which caused string literals to
4871         be omitted when dumping idata section,
4872         * (pic16_groupRegistersInSection): added code to handle registers
4873         in specific memory banks,
4874         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
4875         public, all references are renamed too,
4876         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
4877         AOP_DPTR2,
4878         * (pic16_storeForReturn): added case to handle when dest is WREG,
4879         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
4880         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
4881         pic16_rel_udata, check to see if that register is marked as being
4882         a member of a specific memory bank,
4883         * (pic16_printIvalCharPtr): added code to add string literals either
4884         to code or the idata sections,
4885         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
4886         also accept the 'udata' pragma,
4887         * src/pic16/main.h: new structure types sectName and sectSym
4888         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
4889         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
4890         * (pic16_findPrevInstruction): fixed, it returned nothing,
4891         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
4892         instruction combinations,
4893         * (pic16_FixRegisterBanking): heavily reorganised,
4894         * (pic16_AnalyzeBanking): if generating banksel directives is
4895         disabled, then don't call FixRegisterBanking at all,
4896         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
4897         completely removed,
4898         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
4899
4900 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
4901
4902         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
4903         Phuah Yee Keat <yk.phuah AT nestac.com>
4904
4905 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4906
4907         * src/pic16/glue.c (pic16createInterruptVect): function now emits
4908         correctly the IVT even if it is relocated to some other location
4909
4910 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
4911
4912         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
4913         * device/include/pic16/pic18f2220.h: NEW,
4914         * device/lib/pic16/libdev/pic18f2220.c: NEW,
4915         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
4916         * src/pic16/device.c (struct Pics16): added info for 18f2220,
4917         * src/pic16/device.h (struct pic16_options): added ivt_loc and
4918         nodefaultlibs, ivt_loc is the location of the interrupt vector
4919         table, and nodefaultlibs signs that default libraries should not be
4920         linked in link stage,
4921         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
4922         according to --ivt-loc argument,
4923         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
4924         when pragma stack is found,
4925
4926 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4927
4928         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
4929         256 (range check), 257 (do while), 258.a-f (bit banging
4930         f.e. on 3-wire SPI bus)
4931
4932 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4933
4934         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
4935         variables used exclusively within a loop
4936
4937 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
4938
4939         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
4940
4941 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4942
4943         * src/SDCClrange.c (computeClash): fixed bug #971834
4944
4945 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4946
4947         * src/mcs51/gen.c (genCmp): fixed bug #975903
4948         * src/hc08/gen.c (operandsEqu),
4949         * src/ds390/gen.c (operandsEqu),
4950         * src/z80/gen.c (operandsEqu),
4951         * src/pic/gen.c (operandsEqu),
4952         * src/pic16/gen.c (operandsEqu),
4953         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
4954         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
4955
4956 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4957
4958         * src/SDCCcse.c (cseBBlock): fixed bug #966963
4959
4960 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
4961
4962         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
4963         default case in switch statement,
4964         * glue.c (pic16_initPointer): expr is initialised via decoarteType
4965         to eliminate problem with initialisation of pointers, but problem
4966         still exists,
4967         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
4968         * (emitStaticSegment): removed various lines emitting debug info,
4969         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
4970         added processor registers for utilizing EEPROM,
4971         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
4972         configurable and set 8
4973
4974 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
4975
4976         * .version: increased version number to 2.4.2,
4977
4978         Cumulative patch for pic16 port
4979         * src/pic16/device.c: changed scheme to dump initial values for
4980         variables in idata segment, all print_idata* functions were removed,
4981         now the pic16_printIval* will be called,
4982         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
4983         * _pic16_printPointerType, pic16_printPointerType,
4984         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
4985         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
4986         NEW, similar to the respective functions in SDCCglue.c,
4987         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
4988         way, emitting hex bytes,
4989         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
4990
4991 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4992
4993         * src/avr/ralloc.c (serialRegAssign),
4994         * src/xa51/ralloc.c (serialRegAssign),
4995         * src/pic/ralloc.c (serialRegAssign),
4996         * src/pic16/ralloc.c (serialRegAssign),
4997         * src/hc08/ralloc.c (serialRegAssign),
4998         * src/z80/ralloc.c (serialRegAssign),
4999         * src/ds390/ralloc.c (serialRegAssign),
5000         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
5001
5002 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5003
5004         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
5005         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
5006
5007 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
5008
5009         Cumulative patch for pic16 port:
5010         * src/pic16/device.h (typedef PIC16_device) modified fields for
5011         defining microcontrollers,
5012         * src/pic16/device.c: added new info for all devices in Pics16 array,
5013         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
5014         to be optimised out by the pCode optimiser,
5015         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
5016         specially, bug reported by G.M. Gallant,
5017         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
5018         as force'd so that cannot be optimised out by pCode optimiser,
5019         * src/pic16/pcode.c,
5020         * src/pic16/pcodepeeph.c,
5021         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
5022         they are disabled by default, but can be enabled explicit with
5023         command argument --denable-peeps, for testing,
5024         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
5025         --pomit-ivt in COMPILE_FLAGS
5026
5027 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5028
5029         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
5030           compilation on MSVC
5031
5032 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
5033
5034         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
5035
5036 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5037
5038         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
5039         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
5040
5041 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
5042
5043         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
5044         would only assign 0x300001 register.
5045
5046 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
5047
5048         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
5049         in COMPILE_FLAGS. Thanks to G. Gallant for report.
5050
5051 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5052
5053         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
5054         for ds80c400
5055         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
5056         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
5057         added peephole 254 (left shift), 255 (jump table)
5058
5059 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
5060
5061         * device/lib/Makefile.in: removed comment line with model-pic16,
5062         * (target port-specific-objects-pic16): the libraries and objects
5063         are copied to the build directory form the device/lib/pic16/bin
5064         directory
5065
5066         Cumulative patch concerning pic16 port:
5067         * library directory has been re-organized,
5068         * added support for PIC18F1220,
5069         * added headers and library sources for chips 18f1220,18f6520,
5070         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
5071
5072         * configuration registers setting has changed, now each supported
5073         device has a complete description of the registers it uses,
5074         * all initialisations are moved to idata sections, these section
5075         can be absolute or relocatable,
5076         * fixed initialisation of codespace variables,
5077         * fixed warning about PCLATU and gpsim,
5078         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
5079         * (genAssign): use table reads when assigning from variables in codespace,
5080         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
5081         char/int variables placed in codespace,
5082         * (pic16_emitConfigRegs): NEW, emits a list with configuration
5083         registers set in .asm file, no need for --pomit-config-words anymore,
5084         * (pic16glue): some 8051 legacy segments are commented out
5085         (to be removed completely),
5086         * added support for alternative assembler and linker with --asm=
5087         and --link= command line arguments,
5088         * peepholes are disabled automatically in the port, no need to
5089         specify on command line,
5090         * port supports natively char/int/long multiplication, but converts
5091         all divisions to support functions,
5092         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
5093         to the file set in variable $2,
5094         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
5095         strings in ASCII format and not in hex,
5096         * ralloc.c (serialRegAssign): added a triplet of conditional calls
5097         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
5098         allocate proper register if iCodes aren't temporary,
5099
5100 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
5101
5102         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
5103
5104 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
5105
5106         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
5107         is commented out
5108
5109 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5110
5111         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
5112         computed address is reused
5113         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
5114         multi-byte bitfields
5115
5116 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5117
5118         * src/z80/gen.c: (genArrayInit): must check for pointers too
5119
5120 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
5121
5122         * support/regression/tests/zeropad.c: never meant to commit the
5123           nestedstruct test: removed, added check for GCC version
5124
5125 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
5126
5127         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
5128         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
5129         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
5130           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
5131           bugs 928906 and 954082 half-empty initializers
5132         * src/SDCCsymt.h,
5133         * src/SDCCsymt.c (getAllocSize): added for above fix
5134         * src/z80/gen.c (genArrayInit): fixed bug 741044
5135         * support/regression/tests/zeropad.c: added tests
5136
5137 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
5138
5139         * src/pic16/device.c (pic16_dump_section): corrected bug which
5140         caused some symbols of the libraries to be misplaced
5141
5142 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5143
5144         * src/pic16/glue.c,
5145         * src/pic16/ralloc.h,
5146         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
5147         to fix conflict with pic port
5148
5149 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
5150
5151         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
5152         externs configuration variables,
5153         * src/pic16/ralloc.h,
5154         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
5155         prototype in header, commented out some debug messages
5156
5157 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
5158
5159         * src/pic16/glue.c,
5160         * src/pic16/main.c,
5161         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
5162         for gpasm COFF object generation. Thanks to D. Hawkins for
5163         his patch info
5164
5165 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5166
5167         * src/ds390/main.c,
5168         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
5169         Brock for spotting this)
5170         * src/ds390/gen.c (genEndFunction),
5171         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
5172         interrupt handler and critical. Disable push/pop optimizations when
5173         peephole optimizations disabled.
5174
5175 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5176
5177         Updated pic16 library sources and headers.
5178         * device/lib/pic16/pic18f*/ ,
5179         * device/include/pic16/*.h: modified to handle structured SFR
5180         definitions
5181
5182 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
5183
5184         * src/port.h (PORT structure): added hook initPaths, now each
5185         port can declare its own default search paths,
5186         which can been seen with the --print-search-dirs option,
5187         see pic16 port for example,
5188         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
5189         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
5190         * (doPrintSearchDirs): NEW, replaces in a central manner the
5191         printing of search dirs which was split in set*Paths functions,
5192         * (main): added call to port->initPaths and doPrintSearchDirs,
5193         * src/avr/main.c,
5194         * src/ds390/main.c,
5195         * src/hc08/main.c,
5196         * src/izt/i186.c,
5197         * src/izt/tlcs900h.c,
5198         * src/mcs51/main.c,
5199         * src/pic/main.c,
5200         * src/pic16/main.c: modified port structures to reflect addition of
5201         initPaths hook,
5202
5203         * src/pic16/device.c (regCompare): registers are finally sorted by name,
5204         * (pic16_dump_section): for registers in same address reserve memory once,
5205         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
5206         to no_banksel,
5207         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
5208         result is greater in size than right or left,
5209         * (pic16_genUMult8X8_8): there are some cases where the result can
5210         be 16 bits size, so handle these,
5211         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
5212         * (pic16_outBitC): modified to emit pcodes,
5213         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
5214         or not,
5215         * (genDivOneByte): implemented algorithm to divide 8-bits,
5216         * (genCmp): uncommented goto, but issues still exist,
5217         * (genAnd): fixed a bug with variables >8bits,
5218         * (genPackBits): optimization added that uses BCF/BSF to change a
5219         single bit,
5220         * (genAssign): fixed bug when assigning floating point literals,
5221         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
5222         __sdcc_gsinit_startup label,
5223         * src/pic16/main.c (_pic16_init): removed search directory
5224         initialisations,
5225         * (_pic16_initPaths): NEW, used to initialise search directories,
5226         * (_hasNativeMulFor): support functions for all except char/int
5227         multiplication, and char division,
5228         * (PIC16_port struct): modified entry for native mul support,
5229         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
5230         no_banksel option,
5231         * (buildCallTree): call to register_usage is ifdef'ed out,
5232
5233 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5234
5235         * device/include/string.h: applied Stas Sergeev's patch to make this
5236         header file compatible with the preprocessor -Wundef option
5237         * src/SDCCmain.c (main): abort compilation if preprocessor reports
5238         failure (fixes bug #941458)
5239
5240 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5241
5242         * src/SDCCopt.c (killDeadCode): fixed bug #907733
5243         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
5244         that the variable, not the function, should be static
5245         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
5246         to be consistent with non-literal case
5247
5248 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5249
5250         * src/SDCCast.c (isConformingBody): fixed bug #949967
5251         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
5252         convilong): fixed bug #952086
5253
5254 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5255
5256         * src/SDCCmem.c (allocVariables): fixed bug #955321
5257
5258 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5259
5260         * src/hc08/main.c (_hc08_genAssemblerEnd),
5261         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
5262         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
5263         completely eliminated the use of a temporary file
5264         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
5265         when more than one file linked
5266         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
5267
5268 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5269
5270         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
5271         which fixes bug #543481
5272         * support/regression/tests/bug-751703.c: fixed comments left from a
5273         cut and paste error
5274         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
5275         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
5276         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
5277         scopes
5278         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
5279         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
5280         are now changed to underscores in moduleName
5281
5282 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5283
5284         * as/mcs51/lkmem.c: better fix for bug #954173
5285
5286 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
5287         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5288
5289         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
5290         * device/include/c8051f000.h,
5291         * device/include/c8051f120.h,
5292         * device/include/c8051f300.h,
5293         * device/include/c8051f310.h,
5294         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
5295         PWM16) and detab'ed
5296
5297 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5298
5299         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
5300         and mailing lists, doc'ed --no-peep-comments, removed reference
5301         to knoppix (newest version has no LyX/LaTeX), other minor changes
5302         * src/SDCCglue.c (glue): save 2 bytes stack space with
5303         option --main-return. The ljmp could probably be avoided too
5304
5305 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5306
5307         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
5308
5309 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5310
5311         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
5312         * src/SDCCopt.c (isLocalWithoutDef),
5313         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
5314         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
5315         (credit to Maarten Brock for patch #949363, on which this is based)
5316         * support/regression/tests/bug-751703.c: some test cases of extern used
5317         within inner scopes.
5318
5319 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5320
5321         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
5322         SPEC_STRUCT
5323         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
5324         struct definitions
5325         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
5326         dwWriteLabel): fix to create valid debugger symbols even when
5327         the module name has non-alphanumeric symbols in it
5328         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
5329         when a variable's allocation has been optimized away
5330
5331
5332 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5333
5334         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
5335         * src/hc08/main.c,
5336         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
5337         * src/mcs51/main.c,
5338         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
5339         * src/ds390/main.c,
5340         * src/z80/gen.c (z80_emitDebuggerSymbol),
5341         * src/z80/main.c,
5342         * src/pic/gen.c (pic14_emitDebuggerSymbol),
5343         * src/pic/main.c,
5344         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
5345         * src/pic16/main.c,
5346         * src/avr/gen.c (avr_emitDebuggerSymbol),
5347         * src/avr/main.c,
5348         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
5349         * src/xa51/main.c,
5350         * src/SDCCdebug.c (emitDebuggerSymbol),
5351         * src/SDCCdebug.h,
5352         * src/port.h: added a debugger struct to the port struct. Added a
5353         callback for defining debugger symbols
5354
5355         * src/SDCCast.c (createLabel),
5356         * src/SDCC.y (labeled_statement): mark all compiler generated labels
5357         with isitmp = 1
5358         * src/SDCCicode.h,
5359         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
5360         iCode back to the ast for the function
5361
5362         * src/hc08/ralloc.c (hc08_assignRegisters),
5363         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
5364         unneeded fields from the regs struct.
5365         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
5366         pushReg() & pullReg() functions instead of emitcode()
5367
5368         * src/hc08/gen.c (genLabel, genhc08Code),
5369         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
5370
5371         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
5372         debugger hooks
5373
5374         * src/hc08/gen.c (genEndFunction, genhc08Code),
5375         * src/hc08/gen.h,
5376         * src/mcs51/gen.c (genEndFunction, gen51Code),
5377         * src/mcs51/gen.h,
5378         * src/ds390/gen.c (genEndFunction, gen390Code),
5379         * src/ds390/gen.h,
5380         * src/z80/gen.c (genEndFunction, genZ80Code),
5381         * src/z80/gen.h,
5382         * src/z80/z80.h,
5383         * src/pic/gen.c (genEndFunction, genpic14Code),
5384         * src/pic/gen.h,
5385         * src/pic16/gen.c (genEndFunction, genpic16Code),
5386         * src/pic16/gen.h,
5387         * src/avr/gen.c (genEndFunction, genAVRCode),
5388         * src/avr/gen.h,
5389         * src/xa51/gen.c (genEndFunction, genXA51Code),
5390         * src/xa51/gen.h,
5391         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
5392         specific code to cdbFile.c and out of the backend code generators
5393
5394         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
5395         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
5396         starting address is now 0
5397
5398         * as/hc08/asm.h,
5399         * as/hc08/m08pst.c,
5400         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
5401         assembler directive for DWARF support
5402         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
5403
5404         * src/src.dsp,
5405         * src/Makefile.in,
5406         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
5407
5408 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5409
5410         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
5411         and inappropriate peephole optimization in jump tables
5412
5413 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5414
5415         * as/hc08/m08pst.c,
5416         * src/SDCCglue.c: sdccopt works for the hc08 port now
5417
5418 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
5419
5420         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
5421
5422 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5423
5424         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
5425
5426 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5427
5428         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
5429         rules
5430         * src/SDCCmain.c,
5431         * src/SDCCglobl.h,
5432         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
5433         comments from the peephole optimizer replacement rules
5434         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
5435         symbols
5436         * src/SDCCcse.c (updateSpillLocation),
5437         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
5438         equivalents
5439         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
5440         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
5441         objects far pointers
5442
5443 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5444
5445         * src/SDCCsymt.h: a missing part of my last change
5446         * src/pic/ralloc.c (regTypeNum),
5447         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
5448
5449 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5450
5451         * src/SDCCicode.h,
5452         * src/SDCCicode.c (aggrToPtrDclType),
5453         * src/SDCCptropt.h,
5454         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
5455         ptrPseudoSymConvert),
5456         * src/pic/ralloc.c (regTypeNum),
5457         * src/pic16/ralloc.c (regTypeNum),
5458         * src/hc08/ralloc.c (regTypeNum),
5459         * src/ds390/ralloc.c (regTypeNum),
5460         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
5461         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
5462
5463 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5464
5465         * link/z80/lkmain.c (afile),
5466         * as/hc08/lkmain.c (afile),
5467         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
5468         prevent a pointer problem when a filename has no directory and
5469         no extension specified.
5470
5471 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5472
5473         * link/z80/lkmain.c (afile): allow periods in directory names
5474         * link/z80/lkmain.c (afile),
5475         * as/mcs51/lkmain.c (afile),
5476         * as/hc08/lkmain.c (afile): allow linker script file to have an
5477         extension other than ".lnk"
5478         * link/z80/lklex.c (getfid),
5479         * link/z80/lkmain.c (parse),
5480         * as/mcs51/lklex.c (getfid),
5481         * as/mcs51/lkmain.c (parse),
5482         * as/hc08/lklex.c (getfid),
5483         * as/hc08/lkmain.c (parse): Support comments in the linker script
5484         file on lines by themselves and after filenames
5485
5486 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5487
5488         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
5489
5490 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5491
5492         * src/z80/peeph-z80.def: removed some peephole rules that don't
5493         work with multibyte arithmetic (fixed bug #937126)
5494         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
5495         to registers and not global variables
5496         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
5497         geniCodePreInc, geniCodePostDec, geniCodePreDec,
5498         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
5499         checking for assignments not internally generated (fixed bug #931895)
5500         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
5501         structure member (fixed bug #930072)
5502
5503 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5504
5505         * src/SDCCmain.c (linkEdit),
5506         * src/hc08/main.c (_hc08_parseOptions),
5507         * as/hc08/Makefile.in,
5508         * as/hc08/aslink.h,
5509         * as/hc08/asm.h,
5510         * as/hc08/m08pst.c,
5511         * as/hc08/lkrloc.c (relr, rele),
5512         * as/hc08/lkarea.c (lnkarea)
5513         * as/hc08/lkmain.c (afile, parse),
5514         * as/hc08/lkelf.c: support for ELF output
5515         * as/hc08/lks19.c (s19),
5516         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
5517
5518 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5519
5520         * as/mcs51/lkihx.c: Fixed bug #899105.
5521
5522 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5523
5524         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
5525         .dsp files from Unix to DOS.
5526
5527 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5528
5529         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
5530         function pointers; we have been compliant for several months now.
5531         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
5532         change that was accidently commented out
5533         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
5534         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
5535         bug #922319
5536
5537 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5538
5539         * src/hc08/gen.c: output of all of the internal debugging information
5540         is now controlled by the D() macro; it is disabled by default
5541
5542 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5543
5544         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
5545         harder to keep the same registers during a CAST iCode
5546         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
5547         long via int can be done in a single cast, if the signedness is
5548         correct.
5549         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
5550         putchar() in tinibios.c in ds390's library
5551
5552 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
5553
5554         * src/SDCCast.c (decorateType): fixed bug #898889,
5555         cast result of a literal complement too
5556         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
5557         fixed check for bitfields
5558
5559 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
5560
5561         * src/SDCCicode.c (geniCodeLogic): made it static,
5562         (geniCodeLogicAndOr): added in order to fix bug #905492,
5563         (ast2iCode): fixed bug #905492
5564         * support/regression/tests/bug-905492.c: added
5565         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
5566         (processParms): fixed bug #927659: don't copy parms, this will clear
5567         decorated flag
5568         * support/regression/tests/bug-927659.c: added
5569
5570 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
5571
5572         * src/SDCCast.c (addCast): don't cast float to char
5573         * device/lib/libsdcc.lib: added _memmove
5574
5575 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
5576
5577         * device/lib/large/Makefile: fixed parallel execution by
5578         replacing `make` by `$(MAKE)`
5579
5580 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5581
5582         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
5583         offsets (fixes bug #923936)
5584
5585 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
5586
5587         * device/lib/small/Makefile: fixed parallel execution by
5588         replacing `make` by `$(MAKE)`
5589
5590 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5591
5592         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
5593
5594 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
5595
5596         * src/pic/gen.c (genCpl): multi-byte complements were not working.
5597         * src/regression/Makefile: Regression test was not running.
5598
5599 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
5600
5601         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
5602         complement if possible
5603         * src/SDCCval.c (valComplement),
5604         * src/SDCCicode.c (operandOperation): fixed complement of literal
5605         * support/regression/tests/onebyte.c (testComplement): added
5606
5607 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
5608
5609         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
5610         return an optimized tree; actually replace actParm with the new tree
5611         * src/SDCCast.h: added some parantheses to remove side effects
5612         * support/regression/tests/bug-920866.c
5613
5614 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
5615         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
5616         Bit operands were not being handled properly in the pic14 port.
5617         (now src/regression/add.c passes again).
5618
5619 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5620
5621         * src/SDCC.y (labeled_statement): case and default no longer require
5622         a following statement (RFE #893037)
5623
5624 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5625
5626         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
5627         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
5628         disabled (fixes bug #916294)
5629         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
5630         "mov a,acc"; patch provided by Lenny Story
5631         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
5632
5633 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5634
5635         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
5636         functions
5637         * src/ds390/gen.c (genFunction, genEndFunction),
5638         * src/ds390/ralloc.c (ds390_assignRegisters),
5639         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
5640         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
5641         pushed if there are parameters passed on the stack. Also, a cleaner
5642         way to decide if r0/r1 should be pushed/popped. (Together they fix
5643         bug #918693)
5644
5645 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5646
5647         * doc/sdccman.lyx,
5648         * device/lib/mcs51/crtpagesfr.asm,
5649         * device/lib/mcs51/crtxinit.asm,
5650         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
5651         to avoid confusion with Si Lab's SFRPAGE register.
5652
5653 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5654
5655         * src/SDCCglue.c (emitMaps): allow public sfr variables
5656         * src/SDCCglue.c (initialComments): include compiler build date
5657         with compiler version and put the timestamp of the generated
5658         assembly file on a serperate line to be less confusing.
5659         * src/port.h: added genInitStartup hook
5660         * src/avr/main.c,
5661         * src/ds390/main.c,
5662         * src/hc08/main.c,
5663         * src/pic/main.c,
5664         * src/pic16/main.c,
5665         * src/xa51/main.c,
5666         * src/z80/main.c: genInitStartup initialize as NULL (default to
5667         historical behaviour)
5668         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
5669         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
5670         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
5671         library instead of hard coding it into the compiler.
5672         * support/regression/ports/mcs51-stack-auto/spec.mk,
5673         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
5674         * device/lib/mcs51/Makefile,
5675         * device/lib/small/Makefile,
5676         * device/lib/large/Makefile,
5677         * device/lib/mcs51/crtpagesfr.asm,
5678         * device/lib/mcs51/crtstart.asm,
5679         * device/lib/mcs51/crtxclear.asm,
5680         * device/lib/mcs51/crtxinit.asm,
5681         * device/lib/mcs51/crtclear.asm,
5682         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
5683         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
5684         and into user configurable files.
5685         * device/lib/clean.mk: clean mcs51 directory too
5686         * support/regression/tests/longlit.c: added static to T1 declaration
5687         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
5688         accesses in the initialization code
5689
5690 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5691
5692         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
5693         OSCTRIMVAL as noted in bug #916008
5694
5695 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5696
5697         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
5698         in loops with multiple exits (reported as incorrect registers
5699         used by Martin Helmling in Sdcc-user list)
5700
5701 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5702
5703         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
5704         made ds390 register extensions look less like error messages
5705
5706 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5707
5708         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
5709         reported by Adam Wozniak in Sdcc-user list
5710
5711 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
5712
5713         * src/SDCCast.c (decorateType): fixed with bug and promotion in
5714         arithmetic optimizations, added debug output
5715
5716 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
5717
5718         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
5719         * sdcc.spec: updated and split sdcc into 3 rpms
5720         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
5721         needed for literals of LEFT_OP and '+'
5722         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
5723         introduced RESULT_TYPE_NOPROM
5724         (geniCodeMultiply): fixed logic for decision if mul is optimized to
5725         left shift
5726         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
5727         limited promotion to int only for '*'
5728         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
5729
5730 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
5731
5732         * src/pic16/gen.c (genSkip),
5733         (genc16bit2lit), (gencjneshort): commented out
5734         (is_LitOp): new helper function, checks operand type
5735         (genCmpEq): rewritten
5736
5737 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
5738
5739         * support/regression/tests/bug-908454.c: added
5740
5741 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
5742
5743         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
5744         * src/SDCCicode.c (usualBinaryConversions): op needs int type
5745         (geniCodeCast): cosmetic, don't preserve bit storage class
5746         (geniCodeLeftShift): added promotion
5747         (geniCodeLogic): fixed regression
5748         * src/SDCCsymt.c (computeTypeOr): accept bits too
5749         (compareType): 2nd part of fix for bug #908454, needed for bitfields
5750
5751 2004-03-07  Borut Razem <borut.razem AT siol.net>
5752
5753         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
5754
5755 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
5756
5757         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
5758         version of pic16_genPackRegisters which does not check if ic is a
5759         CAST operator,
5760         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
5761         function cause string1.c regression test fails
5762
5763 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
5764
5765         * sim/ucsim/configure.in,
5766         * sim/ucsim/configure,
5767         * sim/ucsim/doc/Makefile.in: use docdir
5768         * src/SDCC.y: fixed sbit atrributes
5769         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
5770         * src/SDCCast.c (decorateType): |^& need special promotion handling
5771         * src/SDCCast.h,
5772         * src/SDCCsymt.h: moved definition of RESULT_TYPE
5773         * src/SDCCsymt.h (computeType),
5774         * src/SDCCicode.c: computeType() needs op
5775         * src/SDCCsymt.c (checkTypeSanity),
5776         * doc/sddman.lyx: "plain" bitfields are unsigned
5777         * src/SDCCsymt.c (computeTypeOr): added
5778         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
5779         |^& ops
5780         * src/SDCCval.c (val*): computeType() needs op
5781         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
5782         * support/regression/tests/onebyte.c: added tests for |^&
5783
5784 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
5785
5786         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
5787         for writing icode into asm output.
5788
5789 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
5790
5791         * src/pic16/device.c: added some debug lines enabled
5792         with macro DEBUG_CHECK,
5793         * src/pic16/genarith.c: more debug in genPlus,
5794         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
5795         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
5796         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
5797         * (aopForSym): onStack symbols are re-placed in data memspace,
5798         and onStack flag is cleared,
5799         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
5800         copy temporary pcodeop,
5801         * (genPcall): added warning for not updating PCLATU,
5802         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
5803         always true for pic16 port,
5804         * (genMultOneWord): NEW, supports integer multiplication,
5805         * (genMult): modified to call genMultOneWord,
5806         * (ifxForOp): added warning when return NULL,
5807         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
5808         flag is set before call to operandFromSymbol for implicit
5809         added structures,
5810         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
5811         options.intlong_rent are set by default,
5812         * (_hasNativeMulFor): modified to allow port generation of integer
5813         multiplication,
5814         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
5815         set regtype to REG_SFR for all registers, restricting seting the
5816         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
5817
5818 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5819
5820         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
5821         more than 500 times in the regression tests
5822
5823 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5824
5825         * support/Util/SDCCerr.h,
5826         * support/Util/SDCCerr.c,
5827         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
5828         enumerator_list),
5829         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
5830         for symbol conflicts.
5831         * support/valdiags/tests/enum.c,
5832         * support/valdiags/tests/tentdecl.c,
5833         * support/valdiags/tests/struct.c: expect possible error messages
5834         referring to original symbol definitions.
5835         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
5836         * src/SDCCsymt.h,
5837         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
5838
5839 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
5840
5841         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
5842
5843 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
5844
5845         * src/pic16/ralloc.c (newReg): fixed bug #908929
5846
5847 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5848
5849         * src/ds390/gen.c: added missing #include "main.h"
5850
5851 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
5852
5853         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
5854         checking if symbol is already in set,
5855         * src/pic16/device.h: prototype for checkAddSym,
5856         * src/pic16/gen.c: (_G): added entry interruptvector,
5857         * (assignResultValue): removed some commented out lines,
5858         * (genFunction): check for ISR via sym->type, absolute section for
5859         interrupt code is created via a new pBlock, the goto instruction is
5860         placed now correctly at the interrupt vector position, changed all
5861         references from ivec to _G.interruptvector,
5862         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
5863         is the interrupt is a high priority one, same for return from ISR,
5864         * src/pic16/glue.c: changed all calls of addSetHead for publics and
5865         externs to calls of checkAddSym,
5866         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
5867         pic16_pcode_verbose flag is set,
5868         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
5869         * src/pic16/pcoderegs.c: message about how many registers are saved
5870         will only be emitted if pic16_pcode_verbose flag is set,
5871
5872 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5873
5874         * src/ds390/ralloc.h,
5875         * src/ds390/ralloc.c (ds390_regWithIdx),
5876         * src/ds390/gen.c (emitcode),
5877         * src/ds390/main.h,
5878         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
5879         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5880         ds390operandCompare, getRegsRead, getRegsWritten,
5881         initializeAsmLineNode): customized instruction size calculation for
5882         ds390, started basis for some register optimizations
5883         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
5884         corresponding assembly output
5885         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
5886         missing push/pop of r0/r1. Optimized push/pops
5887
5888 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5889
5890         * src/mcs51/main.c (instructionSize): fixed ACALL size
5891         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
5892
5893 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
5894
5895         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
5896         the sorting of rlist with NULL elements
5897         * (print_idataType, print_idata): NEW to create idata sections
5898         * src/pic16/device.h: idataSymSet new variable
5899         * src/pic16/gen.c (genFunction): fixed some bugs in string
5900         comparing, improved the absolute section creation for ISRs,
5901         added FSR0L/FSR0H in registers that are saved in an ISR,
5902         * (genInline): fixed the processing of inline snippets,
5903         now they undergo no process by the peephole optimizer
5904         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
5905         are placed in idataSymSet,
5906         * (pic16emitStaticSeg): extern symbols are added in externs,
5907         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
5908         switching when aboslute variables are placed in access bank memory
5909         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
5910         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
5911         commented out with #if,
5912         * (pic16_packRegisters): reintroduce the check for CAST because some
5913         symbols are not correctly handled,
5914         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
5915         pCodeInstruction instead of pCode,
5916         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
5917         pCodeAsmDir definition,
5918         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
5919         directive, then the argument directive is emitted without the leading
5920         tab, hack for inline labels which must be in the first column,
5921         * (compareLabel,pic16_findNextInstruction),
5922         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
5923         * (insertBankSwitch): modified for the new pCodeAsmDir,
5924
5925 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
5926         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
5927
5928         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
5929         instance,
5930         * (pushSide): commented out with #if,
5931         * (assignResultValue): fixed some typos in saving
5932         registers,
5933         * (genPcall): FIXED and sync'ed with genCall,
5934         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
5935         * (genNearPointerGet): fixed to handle some more cases,
5936         implementation scheme via table reads,
5937         * (genConstPointerGet): modified to access code memory correct,
5938         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
5939         and improved to handle some cases
5940         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
5941         instead of "RETLW" for init data
5942         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
5943         not IN_DIRSPACE, work around to reduce bank switching when aboslute
5944         variables are placed in access bank memory (<0x80 and >=0xf80),
5945         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
5946         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
5947         TBLWT_POSTDEC,TBLWT_PREINC
5948         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
5949         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
5950         directives
5951         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
5952         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
5953         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
5954         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
5955
5956 2004-02-29  Borut Razem <borut.razem AT siol.net>
5957
5958         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
5959         support/Util/findme.h, support/Util/system.h: enhance binary relative
5960         search for lib and include by using findProgramPath()
5961
5962 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
5963
5964         * src/SDCCpeeph.h,
5965         * src/SDCCpeeph.c (pcDistance),
5966         * src/port.h,
5967         * src/mcs51/ralloc.h,
5968         * src/mcs51/ralloc.c (mcs51_regWithIdx),
5969         * src/mcs51/main.h,
5970         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
5971         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
5972         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
5973         size calculation port specific, started basis for some register
5974         optimizations
5975         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
5976         missing push/pop of r0/r1. Optimized push/pops
5977         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
5978         * device/lib/_modsint.c (_modsint),
5979         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
5980         and stack version so regression tests pass
5981
5982 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
5983
5984         * src/Makefile.in (dep): include SLIBOBJS in dependency check
5985         * src/SDCCast.c (decorateType): catch another small optimization
5986         with '?' operator
5987         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
5988         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
5989         modified to finally use computeType() all over SDCC,
5990         see Feature Request #877103
5991         * src/SDCCval.h: cosmetic
5992         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
5993         valCompare(); regression tested in muldiv.c
5994         * support/regression/tests/muldiv.c (testMod): mod sign follows
5995         dividend only
5996
5997 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
5998
5999         * src/SDCCast.c (decorateType): fixed bug #902362
6000         * doc/INSTALL.txt: fixed install instructions for win32
6001
6002 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
6003
6004         * device/include/Makefile.in (install): fixed by replacing spaces
6005         by tabs
6006         * doc/README.txt,
6007         * doc/INSTALL.txt: updated for release
6008         * doc/sdccman.lyx: added warning for --xstack being buggy
6009
6010 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
6011
6012         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
6013         to eliminate build warnings.
6014         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
6015
6016 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
6017            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6018
6019         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
6020         removed -penable-stack, added comment for stack pragma, added
6021         warning for not initializing the stack/frame registers, removed
6022         comment at interrupts section
6023
6024         Stack is made permanent, there is no ability to disable stack usage.
6025         * src/pic16/device.h,
6026         * src/pic16/device.c: removed all references to USE_STACK macro,
6027         * src/pic16/device.c (pic16_dump_section): when no elements in
6028         rlist, free rlist before return,
6029         * (pic16_dump_int_registers): NEW, internal registers are a new set
6030         of general purpose registers reused by each function,
6031         * (checkAddReg): returns 1 if registers is added to set,
6032         * (pic16_groupRegistersInSection): when a registers is of type
6033         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
6034         * src/pic16/device.h: memRange and Assigned Memory are deleted,
6035         SRCASECMP macro is moved here from device.c
6036         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
6037         PO_PCLATU, PO_PRODL, PO_PRODH,
6038         * (pic16_pCodeOpType, genMinus,
6039         changed compares to "a" register, with AOP_ACC,
6040         * (pic16_genPlus): fixed some bugs and indented properly,
6041         * (pic16_addSign): changed size to size+offset in the MOVWF
6042         instruction,
6043         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
6044         multiply 8-bit operand by literal, result is 8-bit,
6045         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
6046         multiply 2 8-bit operand, result is 8-bit,
6047         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
6048         genUMult8X*_16,
6049         * src/pic16/gen.c: changed accUse to contain WREG only,
6050         * (pic16_emitcomment): renamed to pic16_emitpcomment,
6051         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
6052         true, do not use immediate addressing any more unless sym is a
6053         pointer in codespace,
6054         * (aopForRemat): do not use immediate addressing when symbol not in
6055         codespace and when symbol's address is requested,
6056         * (aopOp): for-loop in if(sym->accUse) is modified for the new
6057         accUse size (= 1),
6058         * (aopGet): added case for AOP_ACC and don't return "accumulator
6059         bug" but WREG instead,
6060         * (popGetTempReg): pushes contents of temporary register in stack,
6061         * (popReleaseTempReg): pops contents of temporary register from
6062         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
6063         * (pic16_popGet): separated case AOP_ACC to return register WREG
6064         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
6065         or PO_IMMEDIATE and initializes their instance/offset appropriately,
6066         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
6067         the use of immediate pointers to certain cases only.
6068
6069         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
6070         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
6071         * (assignResultValue, genCall, genRet): modified to use the new
6072         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
6073         genPcall is still broken,
6074         * (genFunction): added code to create 'A' type pBlocks when
6075         interrupt functions are generated, code not extensively tested yet,
6076         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
6077         * (genEndFunction): modified so ISRs pop stored registers from stack,
6078         * (genMultOneByte): cleanup,
6079         * (AccRsh): added flag andmask, to and result with appropriate mask,
6080         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
6081         * (genDataPointerGet): fixed and reenabled its use,
6082         * (genNearDataPointerGet): bugs fixed,
6083         * (genDataPointerSet): bugs fixed,
6084         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
6085         pic16_DumpSymbol, pic16_DumpOp,
6086         * src/pic16/genutils.h: function prototypes for the above functions,
6087         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
6088         pointers,
6089         * (pic16emitRegularMap): many many many improvements, but needs a
6090         major cleanup,
6091         * src/pic16/main.c: enable_stack in pic16_options is removed,
6092         * (_pic16_parseOptions): removed command line options -penable-stack,
6093         * (_process_pragma): emit stack symbol only when stack pragma is
6094         processed,
6095         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
6096         redirected to FSR0L/FSR0H pair,
6097         * (pic16_get_op, pic16_get_op2): modifications and improvements,
6098         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
6099         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
6100         for immediates,
6101         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
6102         * (dumpPicOptype): NEW,
6103         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
6104         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
6105         with movff instruction,
6106         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
6107         added pic16_int_regs, some packRegsFor* functions are commented out,
6108         because produce errors,
6109         * src/pic16/NOTES: minor modifications
6110
6111 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6112
6113         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
6114         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
6115         --pack-iram.
6116         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
6117         * as/mcs51/lkaomf51.c: fixed bug #895763
6118
6119 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
6120
6121         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
6122
6123 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6124
6125         * doc/sdccman.lyx: added details about the HC08 storage classes and
6126         interrupts, fixed the register usage info for z80 & gbz80
6127
6128 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
6129
6130         * doc/sdccman.lyx: added more pic16 port documentation
6131         * device/include/pic16/: added header pic18fregs.h
6132
6133 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
6134
6135         * doc/sdccman.lyx: added Vangelis' contribution
6136
6137 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6138
6139         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
6140         extend to the next CALL or PCALL, not just to the next CALL.
6141
6142 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
6143
6144         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
6145
6146 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6147
6148         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
6149         bug #895752 and a better fix for bug #716790
6150
6151 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6152
6153         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
6154
6155 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6156
6157         * doc/sdccman.lyx: minor changes, minor changed
6158
6159 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
6160
6161         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
6162         which can't handle SDCC_NEWONEBYTEOPS,
6163         (geniCodeMultiply): removed conversion from mult to shift for pic14
6164         and pic16
6165
6166 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6167
6168         * src/hc08/gen.h,
6169         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
6170         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
6171         thus fixing bug #895406
6172
6173 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
6174
6175         * device/lib/_modsint.c,
6176         * device/lib/_modslong.c: sign follows divisor only
6177         * src/hc08/gen.c (genMultOneByte): if result size is 1,
6178         signs or signedness can be ignored
6179         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
6180         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
6181         added optimization for IFX,
6182         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
6183         arguments;
6184         reenabled optimization for IFX, which was removed on 2004-01-11
6185         * src/SDCCast.h: added return type IFX
6186         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
6187         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
6188         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
6189         SDCC_OLDONEBYTEOPS selects the old behaviour
6190         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
6191         changed again and commented promotion rule
6192         * src/SDCCval.c (valDiv): promotion no longer necessary
6193         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
6194         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
6195         rewritten
6196         * support/regression/tests/onebyte.c: added
6197
6198 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
6199
6200         * gen.c (genInline): reverted to old code for assemnling inline
6201         code because of bug reported James Chadd
6202
6203 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
6204
6205         * ralloc.h: missing declarations from previous patch,
6206         seems that patch for ralloc.h was never applied, fixed
6207
6208 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6209            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6210
6211         * pcode.c,
6212         * pcode.h,
6213         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
6214         indirect addressing. Marked FSR0 as deprecated
6215         * gen.c (pointerCode): commented out, not needed now
6216         (pic16_popGet2p): new MOVFF helper function
6217         (genGenPointerGet),
6218         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
6219         (shiftRLong): removed duplicate debugging info
6220
6221 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6222
6223         * src/ds390/gen.c (genNearPointerGet),
6224         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
6225         optimization with bits, but not bitfields.
6226         * src/ds390/ralloc.c (packRegisters),
6227         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
6228
6229 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
6230
6231         * src/SDCCcse.c (algebraicOpts): copy operands before modification
6232
6233 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6234
6235         * src/SDCCsymt.h,
6236         * src/SDCCicode.c (operandFromSymbol),
6237         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
6238         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
6239         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
6240         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
6241         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
6242         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
6243         bug #892038
6244         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
6245         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
6246         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
6247         * src/SDCCsymt.c (newSymbol),
6248         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
6249         enumerator_list),
6250         * src/SDCCval.h,
6251         * src/SDCCval.c (newiList): fixed bug #885705
6252
6253 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6254
6255         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
6256         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
6257
6258 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6259
6260         * device/include/c8051f120.h,
6261         * device/include/c8051f300.h,
6262         * device/include/c8051f310.h: added/updated header files for Silicon
6263         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6264         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
6265         in new section Submitting patches
6266
6267 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6268
6269         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
6270         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6271         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6272         genGenPointerSet),
6273         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
6274         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6275         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6276         genGenPointerSet),
6277         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
6278         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6279         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6280         genGenPointerSet),
6281         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
6282         genFarPointerGet, genCodePointerGet, genGenPointerGet,
6283         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
6284         genGenPointerSet): fixed bug #892400
6285         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
6286         to eliminate build warnings.
6287         * src/SDCCast.c (processParms),
6288         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
6289         fixed bug 751859
6290         * support/valdiag/valdiag.py: added GCC to the list of defines active
6291         when compiling with gcc
6292
6293 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6294
6295         * support/Util/SDCCerr.h,
6296         * support/Util/SDCCerr.c,
6297         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
6298         with an incomplete type (fixed bug #883734)
6299         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
6300
6301 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6302
6303         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
6304
6305 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6306
6307         * src/SDCCast.c (decorateType),
6308         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
6309         function pointer implementation
6310         * support/regression/tests/funptrs.c: added tests to verify both forms
6311         of function pointers work correctly. Added tests to verify parameters
6312         are passed in the correct order.
6313
6314 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
6315
6316         * device.c (regCompare): registers are sorted by ascending
6317         address and increasing size,
6318         * main.c (_pic16_finaliseOptions): removed the declaration
6319         of compiler macro MCU. Now a macro of the format pic18fxxxx
6320         will be defined from the command line
6321
6322 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
6323             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
6324
6325         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
6326         PCOP_RLCF was overwritten!
6327         * gen.c (genSkip): commented out calls to pic16_emitcode,
6328         * (genCmpEQ): fixed "long" compares, only high word did get compared,
6329         * (genlshTwo),
6330         * (genRRC): added debugging info,
6331         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
6332         overwritten while shifting,
6333         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
6334         overwritten while shifting,
6335         * (AccLsh),
6336         * (AccRsh),
6337         * (shiftLLeftOrResult),
6338         * (shiftRLeftOrResult),
6339         * (shiftRLong),
6340         * (shiftLLong): Implemented with pic16_emitpcode
6341         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
6342         * (genLeftShift): Fixed bug, operand for shift by variable always
6343         was "and"ed with 0x0f,
6344         * (genLeftShiftLiteral),
6345         * (genrshTwo),
6346         * (genRightShiftLiteral): added debugging info,
6347         * (genrshFour): added comment,
6348         * (genRightShift): determined signedness from operand "left"
6349         instead of "result"
6350
6351 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6352
6353         * src/SDCCicode.c (geniCodeParms),
6354         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
6355         function pointers, fixed function pointer bugs #861242 and #861896
6356
6357 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6358
6359         * device/include/c8051f000.h,
6360         * device/include/c8051f120.h,
6361         * device/include/c8051f300.h: added header files for Silicon
6362         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
6363
6364 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
6365
6366         * src/SDCCast.c (processParams): added new type flow and restructured
6367         (gatherAutoInit): added new type flow
6368         (addCast): cosmetic changes
6369         (getLeftResultType): added new type flow for array indices, patch
6370         provided by Stas, see FR #877103
6371         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
6372         array index patch by Stas
6373         * src/SDCCast.h: added prototype getResultTypeFromType()
6374         * src/SDCCval.h,
6375         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
6376         * src/pic/glue.c (pic14emitStaticSeg),
6377         * src/pic16/glue.c (pic16emitStaticSeg),
6378         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
6379         for initialization of symbols
6380         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
6381         * support/Util/SDCCerr.h:
6382         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
6383         * .version: bumped version number to 2.3.8
6384         * device/include/Makefile.in (install),
6385         * doc/Makefile (install): changed to 'rm `find ...`' construct to
6386         avoid warnings
6387
6388 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
6389
6390         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
6391         Slade Rich fixed an optimization bug
6392         * src/pic/pcodepeep.c,
6393         * src/pic/pcoderegs.c
6394         * doc/Makefile (install): added test for directory
6395
6396 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6397
6398         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
6399         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
6400         * src/pic/ralloc.c (getRegPtr, getRegGpr),
6401         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
6402         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
6403         * as/mcs51/asexpr.c (term),
6404         * as/hc08/asexpr.c (term): fixed bug #887146
6405
6406 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6407
6408         * src/z80/gen.c (genMult): handle single byte result product
6409         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
6410         DUMMY_READ_VOLATILE (fixed bug #886367)
6411
6412 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6413
6414         * support/regression/tests/libmullong.c: fixed logic, on little endian
6415         hosts we ended without a mullong_wrapper()
6416
6417 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6418
6419         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
6420         virus/worm forged address usage.
6421
6422 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
6423
6424         Fixed promotion, it should be done on AST level:
6425         * src/SDCCast.c (addCast): added promotion to int
6426         (decorateType): updated call to upCast()
6427         * src/SDCCicode.c (geniCodeLeftShift): removed call to
6428         usualUnaryConversions()
6429
6430 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
6431
6432         * support/regression/tests/literalop.c (mulWrapper): Added a
6433         wrapper to remove integer overflow warnings.
6434
6435         * support/regression/tests/float_trans.c: Made work on host.
6436
6437         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
6438         location of sz80.
6439
6440         * support/regression/generate-cases.py (main): Changed from inline
6441         to a main method.
6442
6443         * doc/Makefile (install): Changed to depth first to get rid of
6444         missing directory install warning.
6445
6446         * as/Makefile (install-doc): Made work on Mac.
6447
6448 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
6449
6450         * src/SDCCast.c: added an additional type flow in decorateType() of
6451         opposite direction, see feature request #860006; it's enabled at runtime
6452         by setting the environment variable SDCC_NEWTYPEFLOW
6453         * src/SDCCast.h: changed prototype of decorateType()
6454         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
6455         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
6456         'char' to 'int' can be omitted, if both operands are 'unsigned char';
6457         see feature request #877103
6458         * src/SDCCval.c: updated call of decorateType()
6459         (valBitwise): fixed bug #882876
6460         (valMinus): added promotion
6461         (valLogicAndOr): result is unsigned
6462         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
6463         * src/SDCCsymt.c (computeType),
6464         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
6465         must not cause an unsigned operation
6466         * src/pic/glue (pic14emitRegularMap),
6467         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
6468
6469 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
6470
6471         * src/pic/pcode.c (PCodeID): commented out left over debug code
6472
6473 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
6474
6475         * support/valdiag/tests/overflow.c: added shift tests
6476         * src/pic/device.c,
6477         * src/pic/gen.c,
6478         * src/pic/gen.h,
6479         * src/pic/glue.c,
6480         * src/pic/main.c,
6481         * src/pic/pcode.c,
6482         * src/pic/pcode.h,
6483         * src/pic/pcodepeep.c,
6484         * src/pic/pcoderegs.c,
6485         * src/pic/ralloc.c,
6486         * src/pic/ralloc.h: applied patch from Slade Rich;
6487         added support for multiple code pages and multiple RAM banks on the
6488         PIC 14 port. The ASM files now no longer simply assume all the
6489         code / RAM are in the same page / bank. This means the linker can
6490         safely allocate code/RAM of separate ASM files to different pages/banks.
6491         * doc/sdccman.lyx: added Slade's tips
6492         * src/mcs51/peeph.def: fixed bug #880768
6493
6494 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6495
6496         * src/hc08/ralloc.c (rematStr): fixed bug #879282
6497         * src/SDCCast.c (decorateType): fixed bug #880197
6498
6499 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
6500
6501         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
6502         getopt.h.
6503
6504         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
6505         strtof is not part of C89 and isn't included with Mac OS X.
6506
6507 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6508
6509         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
6510         shiftL2Left2Result): fixed bug #879326
6511         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
6512         (genMultOneByte): fixed bug in signed vs unsigned multiplication
6513         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
6514         address fetch for clr instruction
6515         * device/lib/hc08/_mulint.c: created optimized assembly version
6516         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
6517
6518 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
6519
6520         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
6521         proposed in FR #877103
6522
6523 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
6524
6525         * src/SDCCval.c (cheapestVal): added missing checks
6526         * src/SDCCicode.c (usualBinaryConversions): fixed condition
6527         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
6528
6529 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
6530
6531         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
6532         equal operands
6533
6534 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
6535
6536         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
6537         loaded with the linker search paths (-L arguments) and the libraries
6538         to be linked with the current source (-l arguments). Changes
6539         currently will affect only the pic16 port.
6540         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
6541         include path the port specific paths and port specific libraries,
6542         * gplink command now contains the $3 argument,
6543         * src/pic16/device.h,
6544         * src/pic16/device.c,: structure PIC_device is made public and
6545         renamed to PIC16_device, the same for variable Pics which is renamed
6546         to Pics16. Updated all references to them.
6547         * src/pic16/glue.c (pic16glue): corrected bug with code
6548         initialization which bypassed the variable initializations block.
6549
6550         * device/lib/pic16/Makefile.rules: removed --penable-stack from
6551         COMPILE_FLAGS and added the --nostdinc option
6552
6553 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6554
6555         * device/include/mc68hc908jb8.h: Register defs for another member
6556         of the hc08 family. Contributed by Bjorn Bringert - thanks!
6557
6558 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
6559
6560         Documenting changes from previous commits.
6561         * configure.in (version 1.56),
6562         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
6563         when generating output files to configure the pic16 library,
6564         but now I've commented it out, since gputils aren't installed in the
6565         SF compile farm, so library won't compile
6566
6567         * device/lib/Makefile.in (version 1.56): initially I've added in
6568         target 'all' the prerequestive 'model-pic16' so it compiled the
6569         pic16 library, but now I've commented it out for the same reasons
6570         above,
6571         * added targets 'model-pic16' and 'objects-pic16' to compile the
6572         library
6573         * added target 'port-specific-objects-pic16' to handle the
6574         generated libraries and copy them into the build/ directory
6575         * added target 'clean-intermediate-pic16' to clean intermediate
6576         files into pic16 directory
6577         * in target 'installdirs' added line to create directory pic16 in
6578         the installation path
6579
6580         * device/include/Makefile.in (version 1.11): in target 'install'
6581         added lines to copy all header files to installation path,
6582         * in target 'installdirs' added line create directory for pic16
6583         headers in the installation path
6584
6585 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
6586
6587         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
6588          a function call
6589
6590 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
6591
6592         * configure,
6593         * device/lib/configure.in,
6594         * device/lib/configure: fixed for autoconf 2.57
6595
6596 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6597
6598         * src/z80/main.c (_parseOptions): fixed the portmode= command line
6599         option so that it actually works. Made it specific to the z80, since
6600         the gbz80 doesn't have these kinds of I/O ports.
6601
6602 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6603
6604         * device/include/z180.h,
6605         * device/lib/_memcpy.c,
6606         * device/lib/_memmove.c,
6607         * device/lib/_mulint.c,
6608         * device/lib/ser_ir.c,
6609         * device/lib/ser_ir_cts_rts.c,
6610         * device/lib/_strcmp.c,
6611         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
6612         * src/z80/main.c (_process_pragma): add support for pragmas bank and
6613         portmode; added deprecation warning for bank= and protmode= forms.
6614         Also, guard against buffer overflow.
6615         * src/z80/gen.c (aopGet): generate better code for sfr banked read
6616
6617 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6618
6619         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
6620         changed interrupt vector table generation to only emit declared vectors.
6621         * device/include/Makefile.in: added missing backslash
6622         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
6623
6624 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6625
6626         Mainly changes to support compilation of the device libraries
6627         * src/pic16/device.c: stack is allocated via symbol and not
6628         via literal number. The symbol is placed in the corresponding
6629         position of the data ram
6630         * (pic16_dump_section): relocatable and absolute uninitialized
6631         data are now emitted in sorted order to reduce section naming,
6632         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
6633         weren't marked as being in the access bank,
6634
6635 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
6636
6637         Added portion of GNU PIC Library under the directory
6638         device/include/pic16 and device/lib/pic16. These files
6639         contain the declarations of SFRs for the PIC18Fxx2 devices.
6640         The directory is initialized via configure from toplevel.
6641
6642 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
6643
6644         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
6645         the spilllocations to be compared correctly
6646
6647 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6648
6649         * src/SDCCast.c (decorateType): fixed bug introduced today
6650
6651 2004-01-12  Borut Razem <borut.razem AT siol.net>
6652
6653         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
6654         doc/sdccman.lyx: upper case pragmas are deprecated
6655
6656 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
6657
6658         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
6659         in simpler and even better code
6660
6661 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
6662
6663         * src/SDCCicode.c (operandOperation): fixed bug #874819
6664         * src/SDCCast.c (decorateType): fixed
6665         char foo (unsigned long ul) { return ul > 0; }
6666
6667 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6668
6669         * doc/sdccman.lyx: Moved and added some sections, small changes
6670         all over. Telling LaTeX to be less strict with word spacing
6671         to better keep the right margin. Changed some notes about
6672         maintainance of the ports in section 3.2.1 - is it OK like this?
6673
6674 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
6675
6676         SDCC source changes:
6677         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
6678         convilong): modified to inform the pic16 port that builtin functions
6679         are external
6680
6681         PIC16 PORT specific changes:
6682         * src/pic16/device.c pic16_dump_equates() added,
6683         processor registers declared internally by the port are emitted in
6684         the translation as equates,
6685         * src/pic16/gen.c: inline code is passed unprocessed to the
6686         translation,
6687         * (pic16_popGetLit2): fnuction modified to take second operand as
6688         pCodeOp pointer and not as literal,
6689         * (popRegFromIdx): prefixed with pic16_,
6690         * (pic16_popCombine2): modified to receive already allocated pCode
6691         operands,
6692         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
6693         * (genFunction): initializes local stack frame and pushes on stack
6694         all the registers used by this function,
6695         * (genEndFunction): restores all registers from stack and restores
6696         stack frame,
6697         * src/pic16/glue.c (pic16emitRegularMap): various changes and
6698         improvements,
6699         * (pic16glue): changed the program startup sequence,
6700         * added new dbName code 'A' for functions placed in absolute section
6701         * src/pic16/main.c: added function attribute _naked,
6702         * added pragma 'code' to place a fnuction at an absolute address,
6703         * added command line arguments --debug-ralloc and --pcode-verbose,
6704         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
6705         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
6706         * (pic16_newpCodeOpLit2): modified to take the second operand as
6707         pCodeOp pointer,
6708         * (pic16_printpBlock): modified to emit each function in a separate
6709         section,
6710         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
6711         UPPER for immediate operands,
6712         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
6713         instruction,
6714         * src/pic16/peeph.def: all peepholes with movff are commented out,
6715         because there is a problem in the pcode peep optimizer,
6716         * src/pic16/ralloc.c: the register allocator can now reuse local
6717         function symbols for another function. This saves register usage.
6718         * src/pic16/ralloc.h: added flag isLocal in structure regs,
6719
6720         Added file src/pic16/NOTES with information about program writing on
6721         the current port version.
6722
6723 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6724
6725         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
6726         and peephole 252 (array access)
6727
6728 2004-01-09  Borut Razem <borut.razem AT siol.net>
6729
6730         * src/SDCCmain.c : fixed #872250: -l command line defined library
6731           files are scanned before standard library files
6732
6733 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6734
6735         * src/SDCCast.c (decorateType): fixed bug #874046
6736
6737 2004-01-09  Borut Razem <borut.razem AT siol.net>
6738
6739         * support/scripts/sdcc.nsi: remove previous installation
6740
6741 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
6742
6743         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
6744         bytes for last interrupt vector (mcs51)
6745         * sdcc.spec: fixed typo
6746
6747 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6748
6749         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
6750         gen51Code): more efficient parameter receive for --model-large
6751         ("bug" #845294)
6752
6753 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6754
6755         * src/ds390/main.c,
6756         * src/z80/main.c: added missed needLinkerScript flags (more than
6757         one port structure defined in these file)
6758         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
6759         bug #795325
6760
6761 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
6762
6763         * src/SDCCmain.c: removed various references to DEFAULT_PORT
6764         * src/port.h: added flag needLinkerScript in port->linker
6765         structure to inform whether to create a .lnk file or not,
6766         * src/avr/main.c,
6767         * src/ds390/main.c,
6768         * src/hc08/main.c,
6769         * src/mcs51/main.c,
6770         * src/pic/main.c,
6771         * src/pic16/main.c,
6772         * src/xa51/main.c,
6773         * src/z80/main.c: changed appropriately to configure
6774         needLinkerScript flag
6775         * src/pic/gen.c,
6776         * src/pic16/gen.c (genAddrOf): fixed bug #863624
6777         * src/pic/glue.c: added variable udata_section_name to
6778         override default uninitialized data segment definition for
6779         devices only with SHAREBANK memory (reported from Erik Epetrich)
6780         * (pic14emitOverlay): modified to emit a commented overlay segment
6781         directive when no overlay data exist
6782         * (picglue): modified to emit uninitialized data segment
6783         according to udata_section_name
6784         * src/pic/main.c (_pic14_parseOptions): added command line
6785         options --udata-section-name=[name] to override default
6786         udata definition name
6787         * modified _linkCmd and _asmCmd to include compiler passed
6788         arguments via -W option
6789         * src/pic16/main.c: added $l in _asmCmd, changed extension for
6790         object file from '.rel' to '.o' in port->linker structure,
6791         changed size of fptr from 2 to 3 in port structure
6792
6793 2004-01-07  Borut Razem <borut.razem AT siol.net>
6794
6795         * support/scripts/sdcc.nsi: update PATH
6796         * support/scripts/sdcc.ico: craeted
6797
6798 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
6799
6800         * device/include/Makefile.in: fix install
6801         * doc/Makefile: fix install
6802
6803 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6804
6805         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
6806         in bug #860505
6807         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
6808         how the function variable allocation summary is displayed; also
6809         include information about variables allocated to the overlay
6810         segment
6811
6812 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6813
6814         * as/mcs51/lkmain.c: Help about -Y option
6815         * as/mcs51/lkarea.c: Fixed gcc warnings
6816
6817 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6818
6819         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
6820         fixed warning
6821         * support/valdiag/tests/overflow.c: added
6822         * src/SDCCast.c (decorateType),
6823         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
6824         LEFT_OP (left shift)
6825
6826 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6827
6828         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
6829         (default behaviour).
6830
6831 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6832
6833         A python script to validate compiler diagnostic messages. It can be
6834         used to verify that sdcc complains about bad c source code and
6835         gives a good location of the error.
6836         * support/valdiag/Makefile,
6837         * support/valdiag/valdiag.py,
6838         * support/valdiag/tests/*
6839
6840 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
6841
6842         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
6843         * src/SDCCsymt.c (newEnumType),
6844         * src/SDCCsymt.h
6845         * support/Util/SDCCerr.c,
6846         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
6847         enum related bugs.
6848         * support/regression/tests/enum.c: added test for enum values that
6849         require at least 2 bytes of storage.
6850
6851 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6852
6853         * src/common.h: added ifndef/define/endif macros
6854         around the header file.
6855         Bug reported from Jesus Calvino-Fraga
6856
6857 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
6858
6859         * sdcc.spec: updated
6860         * device/include/Makefile.in: don't install CVS directories
6861         * device/lib/Makefile.in: added removal of CVS directories after install
6862         * doc/Makefile: fixed install, added local_icons
6863         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
6864         * src/mcs51/gen.c (genRightShift): fixed bug #870788
6865         * src/ds390/gen.c (genRightShift): fixed bug #870788
6866         * src/SDCCast.c (decorateType): fixed bug #870781
6867
6868 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
6869
6870         PIC16 port related changes:
6871         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
6872         added variable stackPos,
6873
6874         * gen.c: genCall, assignResultValue: added support for
6875         pushing/retrieving function parameters to/from stack,
6876         genFunction,genEndFunction: setup stack frame for the
6877         generated function,
6878         genAddrOf: will be changed according to bug 863624
6879
6880         * added files genutils.c and genutils.h which contain gen*
6881         debugged and optimised functions extracted from gen.c
6882
6883         * glue.c: added variable 'externs' which holds extern symbols,
6884         pic16emitRegularMap: is modified to properly handle relocatable
6885          symbols under the new scheme,
6886         pic16createInterruptVect: is modified
6887         pic16printPublics: is modified to emit 'global' assembler directives,
6888         added pic16_printExterns to print extern symbols,
6889         pic16glue: initializes stack/frame pointer in the beginning of
6890         the assembly output. Temporary hack, will be corrected later,
6891         because gplink yet does not support stack and SDCC does not
6892         yet support a type of crt0.o object to create the final binary.
6893
6894         * Removed many lines that contain 8051 legacy code.
6895         * The code is finally placed under a 'code' directive.
6896         * Added port specific options.
6897
6898         * _process_pragma: simplified since now we do not need *special*
6899         include file to define SFR registers. But a separate header
6900         will be needed. This will be developed later.
6901         * _pic16_parseOptions: added, parses port specific options:
6902         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
6903         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
6904         --preplace-udata-with=
6905
6906         * _pic16_setDefaultOptions: modified to initialize section names,
6907         but hack is temporarly out of order since it needs improvement.
6908         * _pic16_genAssemblerPreamble: configuration words are emitted by
6909         their address instead of their name. This part is incomplete and
6910         supports only the 18Fxx2 devices. Other devices will emit an error
6911         during assembly since they do not contain the same set of config
6912         registers
6913         * _pic16_genIVT: is modified,
6914
6915         * pcode.c: added definitions for some hardware registers that are needed
6916         for stack support
6917         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
6918         All PCI entries are updated. Now LFSR is supported.
6919         * Removed pic16_pciTRIS is mentioned by mdubuc in source
6920         * added pic16_newpCodeOpLit2 to support instructions with
6921         two literal arguments
6922         * pic16_pCode2str: corrected code that emits assembler instructions
6923         with two literal operands and those that have an access bit modifier
6924         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
6925         this fixes a bug which caused some labels to be lost, when an
6926         assembler directive was added, i.e. banksel,
6927         * pic16_FixRegisterBanking: improved logic that causes the insertion
6928         of bank switching,
6929         * InlineFunction: functions that are called once, are not any more
6930         inlined. This can be a port option in the future,
6931
6932         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
6933
6934         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
6935         hold the corresponding uninitialized symbols,
6936         * pic16_allocProcessorRegister: registers have explicit marked the
6937         accessBank field,
6938         * pic16_allocInternalRegister: registers are explicit marked as
6939         not used,
6940         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
6941         processing list, so bit registers were lost,
6942         *
6943
6944         * ralloc.h: added field 'accessBank' and original symbol operand
6945         in register definition,
6946         * removed the field isMapped from register definition,
6947
6948         ** Several functions have been removed from various sources:
6949         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
6950         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
6951         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
6952         pic16_assignRelocatableRegisters
6953
6954         ** others have been introduced:
6955         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
6956         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
6957
6958 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
6959
6960         * support/scripts/inc2h.pl: changed definition of BIT_AT
6961         to emit 'sbit at' instead of 'bit at'. This was a request.
6962
6963         PIC16 port related preliminary changes:
6964         * gen.c: prefixed function popRegFromString with
6965         pic16_ and all references to it corrected
6966         * pcode.c: all pic16_pc_* hardware registers prefixed
6967         with underscore (_),
6968         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
6969         * ralloc.c: newReg(): when register is REG_SFR then
6970         set address to rIdx,
6971         pic16_allocProcessorRegister(): marks register wasUsed=0
6972         pic16_writeUsedRegs(): added a call to assign processor
6973         registers via pic16_assignFixedRegisters
6974
6975 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
6976
6977         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
6978         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
6979         variables in unused register banks.  Also the SSEG is placed
6980         wherever there is enough space for it, and IDATA can be anywhere
6981         in internal RAM.  For now compile using -Wl-Y[stack_size].
6982         The mem file is different for this option as well, since it
6983         makes no sense of talking about DSEG lenght.
6984
6985 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
6986
6987         * src/SDCClrange.c: fixed bug 869095 that caused segfault
6988         in certain cases, e.g. when ROM assignment, patch provided
6989         from Albert den Haan.
6990
6991 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
6992
6993         Many signedness and type propagation fixes:
6994         * src/SDCCicode.c: made geniCodeCast() static
6995         replaced SPEC_ by IS_ (cosmetic)
6996         (operandOperation): fixed div and mod operation
6997         (usualBinaryConversions): added support for promotion of char
6998         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
6999         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
7000         (geniCodeAdd): an array index will stay unsigned, even if promoted
7001         from char to int
7002         (geniCodeArray): ditto
7003         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
7004         * src/SDCCsymt.c (computeType): added more support for char;
7005         promotion of char is selectable by promoteCharToInt, fixed signedness
7006         for all cases
7007         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7008         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
7009         * src/SDCCval (val*): replaced signedness calculation by
7010         computeType()
7011         rearranged if-branches (cosmetic)
7012         (valShift): added warning W_SHIFT_CHANGED
7013         (valCompare): fixed problem with different types
7014         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
7015         * support/regression/tests/literalop.c: added many cases
7016         * support/regression/tests/ast_constant_folding.c: changed finally to
7017         'unsigned int'
7018         * .version: new year, new version: 2.3.7
7019         * src/SDCCmain.c (main): applied patch #866468
7020         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
7021         provided by Scott Bronson
7022         * doc/sdccman.lyx: updated documentation for sdcdb
7023         updated and added chapter tips
7024
7025 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7026
7027         * src/SDCCsymt.h: missing from yesterday's commits
7028
7029 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7030
7031         * src/SDCC.y (struct_or_union_specifier),
7032         * support/Util/SDCCerr.c,
7033         * support/Util/SDCCerr.h: verify that struct & union tags are used
7034         as declared.
7035
7036 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7037
7038         * src/SDCCglobl.h: missing from yesterday's commits
7039
7040 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7041
7042         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
7043         sft_attributes, struct_declaration, parameter_declaration,
7044         type_name, start_block, declaration_list),
7045         * src/SDCC.lex (check_type): support redefinition of typedef names
7046
7047 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7048
7049         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
7050         aligned xdata arrays. Erik helped me with the if clause.
7051
7052 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7053
7054         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
7055         warning
7056
7057 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7058
7059         * src/SDCCast.h,
7060         * src/SDCCast.c (newAst_),
7061         * src/SDCCicode.h,
7062         * src/SDCCicode.c (ast2iCode, newiCode),
7063         * src/SDCCglobl.h,
7064         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
7065         expr, statement, expression_statement, selection_statement,
7066         iteration_statement, expr_opt, jump_statement): foundation for tracking
7067         sequence points
7068         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
7069         point code too)
7070
7071 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7072
7073         * support/Util/SDCCerr.c,
7074         * src/SDCCast.h,
7075         * src/SDCCast.c (createCase, createDefault, decorateType),
7076         * src/SDCClabel.c (labelUnreach),
7077         * src/SDCC.y (labeled_statement, jump_statement): More improvements
7078         to error messages.
7079         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
7080         (with thanks to Stas Sergeev)
7081         * device/include/time.h,
7082         * device/lib/time.c (CheckTime): suppress unreachable code warning
7083
7084 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7085
7086         * src/SDCCast.c (createIvalCharPtr),
7087         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
7088         bug #753752)
7089         * support/regression/tests/nullstring.c: tests for these two bugs
7090
7091 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7092
7093         * support/Util/SDCCerr.h,
7094         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
7095         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
7096         about storage class and 'at' used inside struct or union
7097         * src/SDCCBBlock.c (iCodeFromeBBlock),
7098         * src/SDCCcse.c (ifxOptimize),
7099         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
7100         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
7101         printIval, emitStaticSeg, emitOverlay),
7102         * src/SDCClabel.c (deleteIfx),
7103         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
7104         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
7105         gatherAutoInit, processParms),
7106         * support/Util/SDCCerr.h,
7107         * support/Util/SDCCerr.c (werrorfl): Support for better error location
7108         reporting for post-parse errors.
7109
7110 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7111
7112         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
7113         implicit casts via union; they don't work on big endian systems
7114         (possible fix for bug #861138)
7115
7116 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7117
7118         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
7119         * src/mcs51/main.c: fixed the fix for bug #737001
7120
7121 2003-12-15  Borut Razem <borut.razem AT siol.net>
7122
7123         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
7124
7125 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7126
7127         * support/makebin/makebin.c: put output in binary mode
7128
7129 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7130
7131         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
7132         xdata and data memory on startup. Set the environment variable
7133         SDCC_NOGENRAMCLEAR to disable this.
7134         * src/mcs51/peephole.def,
7135         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
7136         (allows non-interrupt and interrupt code to safely compete for a resource
7137         without the non-interrupt code having to disable interrupts)
7138
7139 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7140
7141         * src/SDCCicode.c (geniCodeAdd),
7142         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
7143         with valFromType if type might be a pointer and host is big endian).
7144         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
7145         types, not just integer types.
7146         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
7147         multiply defined with mismatching "at" address.
7148
7149 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7150
7151         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
7152         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
7153         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
7154         with embedded nulls (fixed bug #753752)
7155
7156 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7157
7158         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
7159         Apparently this did not see much testing (endless loop)
7160
7161 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7162
7163         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
7164
7165 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7166
7167         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
7168         gracefully handle NULL memmap pointers
7169
7170 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7171
7172         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
7173         instead of deleting the iCode when an operand is volatile
7174         * src/z80/gen.c (genDummyRead),
7175         * src/mcs51/gen.c (genDummyRead),
7176         * src/ds390/gen.c (genDummyRead),
7177         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
7178         not just IC_RIGHT
7179         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
7180         * src/SDCC.y: fixed bug #850420
7181
7182 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7183
7184         Applied z80 i/o port patch from Peter Townson and fixed some operators
7185         to better handle operands in A register.
7186         * device/include/z180.h
7187         * src/SDCC.y
7188         * src/SDCCglue.c
7189         * src/z80/gen.c
7190         * src/z80/gen.h
7191         * src/z80/main.c
7192         * src/z80/peeph-z80.def
7193         * src/z80/peeph.def
7194         * src/z80/z80.h
7195
7196 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7197
7198         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
7199
7200 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7201
7202         * device/lib/hc08/_mullong.c: Removed extra #endif
7203
7204 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7205
7206         * sim/ucsim/hc08.src/inst.cc,
7207         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
7208         carries from x to h
7209         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
7210         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
7211         * device/include/stdarg.h: fixed varargs for hc08
7212         * device/lib/Makefile.in,
7213         * device/lib/hc08/Makefile,
7214         * device/lib/hc08/_mulint.c,
7215         * device/lib/hc08/_mullong.c: fixed some endian problems
7216
7217 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7218
7219         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
7220         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
7221         * device/lib/_gptrget.c,
7222         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
7223
7224 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7225
7226         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
7227         * src/SDCCast.c (astErrors): fixed bug #846007
7228         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
7229
7230 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7231
7232         * src/SDCCast.c (decorateType): disabled a transformation I added in
7233         revision 1.188 (access to fields of a structure at an absolute address);
7234         it breaks with bitfields, extern declarations, and gcse analysis.
7235         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
7236         could be assigned through a pointer, so don't complain.
7237         * src/SDCCast.c (astErrors),
7238         * src/SDCCast.h,
7239         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
7240
7241 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
7242
7243         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
7244         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
7245         output of __config directives, since gpasm now supports them
7246         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
7247         pre-processor macro, i.e. -DMCU=p18f452
7248         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
7249         and modified to handle 'cast' icode similarly to '=' icode
7250         * src/pic16/device.h (typedef struct PIC_device): added field
7251         'extMIface' to indicate that chip has external memory interface
7252         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
7253         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
7254         18F8720
7255
7256 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7257
7258         * src/SDCC.y (pointer): fixed bug #846006
7259         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
7260         * src/SDCCast.c (decorateType): fixed bug #846009
7261         * src/ds390/peeph.def,
7262         * src/ds390/gen.c (genAnd, genOr),
7263         * src/mcs51/peeph.def,
7264         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
7265
7266 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7267
7268         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
7269         * src/SDCCdflow.c
7270         * src/SDCCcse.c
7271         * src/SDCCcse.h
7272         * src/SDCCBBlock.h
7273         * src/SDCCBBlock.c
7274
7275 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
7276
7277         fixed bug #845089
7278         * src/SDCCbitv.h,
7279         * src/SDCCbitv.c: added function to free a bitvector
7280         * src/SDCClrange.h,
7281         * src/SDCClrange.c: added function to recompute the liveranges
7282         * src/avr/ralloc.c,
7283         * src/ds390/ralloc.c,
7284         * src/hc08/ralloc.c,
7285         * src/mcs51/ralloc.c,
7286         * src/pic/ralloc.c,
7287         * src/pic16/ralloc.c,
7288         * src/xa51/ralloc.c,
7289         * src/z80/ralloc.c: recompute the liveranges after register packing
7290
7291 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
7292
7293         * src/SDCCloop.c (newInduction): fixed bug #845630
7294
7295 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7296
7297         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
7298         inadvertantly left behind from my 2003-11-12 change
7299
7300 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7301
7302         Updated headers I neglected to commit yesterday.
7303         * src/SDCClrange.h,
7304         * src/SDCCicode.h
7305
7306 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7307
7308         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
7309         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
7310         * src/SDCCopt.c (eBBlockFromiCode),
7311         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
7312         the creation of the key hash table from the sequencing so it can be used
7313         earlier (for some GCSE bug fixes still pending)
7314
7315 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7316
7317         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
7318         * support/regression/tests/addsub.c: testing genPlus shortcut
7319
7320 2003-11-15  Borut Razem <borut.razem AT siol.net>
7321
7322         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
7323
7324 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7325
7326         * src/SDCCcse.c (cseBBlock): fixed bug #527779
7327         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
7328         ordering is immaterial.
7329         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
7330
7331 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7332
7333         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
7334         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
7335         (SIGSEV) of bug #840381
7336         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
7337         unlink new file before rename if new and old filenames are the same)
7338
7339 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7340
7341         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
7342         uninitialized variables) for the mcs51. Set environment variable
7343         SDCC_GENRAMCLEAR to test.
7344         xdata initialization slightly shorter
7345
7346 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7347
7348         * src/SDCCsymt.h,
7349         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
7350         #838241 & 780691 (basicly the same bug)
7351         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
7352         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
7353
7354 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
7355
7356         * src/SDCCmain.c (linkEdit): "fix" #834252
7357
7358 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7359
7360         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
7361         * src/SDCCast.h,
7362         * src/SDCC.y: fixed bug #819403
7363
7364 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7365
7366         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
7367         the reentrant attribute.
7368         * src/hc08/gen.c (genPackBits): added missing stack readjustment
7369         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
7370         simulation
7371         * src/SDCCast.c (decorateType): fixed bug with storage class not being
7372         updated during pointer dereference; f.e. ~(((char *)1)*) was being
7373         erroneously reduced to a literal.
7374         * src/hc08/ralloc.c (packRegisters, rematStr),
7375         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
7376         some cases
7377
7378 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7379
7380         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
7381         * doc/sdccman.lyx: changed from 'article' to 'book'
7382         * doc/Makefile: readded test_suite_spec and cdbfileformat
7383
7384 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
7385
7386         * device/include/stdlib.h: include malloc.h to comply with ANSI
7387         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
7388
7389 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7390
7391         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
7392         * doc/clean.mk: also remove *.out files
7393         * doc/sdccman.lyx: some additions, larger top/bottom margins
7394
7395 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7396
7397         * src/SDCC.y: fixed bug #837365
7398         * support/regression/tests/bitopcse.c
7399         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
7400         a symbol (might be valop instead)
7401         * device/lib/Makefile.in: added errno.c to HC08SOURCES
7402         * device/lib/clean.mk: added hc08 to the cleaning list
7403
7404 2003-11-04  Borut Razem <borut.razem AT siol.net>
7405
7406         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
7407           made 2003-11-04
7408         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7409           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
7410           malloc is declared in standard stdlib.h
7411
7412 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7413
7414         * device/lib/hc08/Makefile: need to clean .rel not .o files
7415         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
7416
7417 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7418
7419         * src/port.h,
7420         * src/hc08/main.c,
7421         * src/mcs51/main.c,
7422         * src/ds390/main.c,
7423         * src/z80/main.c,
7424         * src/avr/main.c,
7425         * src/pic/main.c,
7426         * src/pic16/main.c,
7427         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
7428         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
7429         tests (which uses the port's oclsExpense function)
7430         * src/SDCC.y,
7431         * src/SDCCast.c,
7432         * src/SDCCicode.c,
7433         * src/hc08/gen.c,
7434         * src/ds390/gen.c,
7435         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
7436
7437 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7438
7439         * src/SDCCcse.c (ifxOptimize),
7440         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
7441         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
7442         deleting the IFX iCode.
7443         * src/hc08/ralloc.c: reduced unneeded slocs
7444         * src/hc08/gen.c: fixed bug in asmopToBoolean
7445
7446 2003-11-04  Borut Razem <borut.razem AT siol.net>
7447
7448         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
7449           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
7450           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
7451           transferred to configure
7452
7453 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
7454
7455         Use headers defined in the C[++] standards:
7456         * sim/ucsim/gui.src/serio.src/fileio.cc
7457         * sim/ucsim/gui.src/serio.src/frontend.cc
7458         * sim/ucsim/gui.src/serio.src/main.cc
7459         * sim/ucsim/gui.src/serio.src/posix_signal.cc
7460         * support/Util/NewAlloc.c
7461         * as/hc08/lklibr.c
7462         * as/mcs51/lklibr.c
7463         * as/z80/aslist.c
7464         * as/z80/assym.c
7465
7466 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7467
7468         * Added MSVC projects for hc08 assembler and linker:
7469         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
7470         /as/hc08/link_hc08.dsp
7471
7472 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
7473
7474         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
7475
7476 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
7477
7478         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
7479
7480 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7481
7482         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
7483
7484 2003-10-31  Borut Razem <borut.razem AT siol.net>
7485
7486         * support/cpp2/cpplib.h,
7487           support/cpp2/cpplib.c,
7488           support/cpp2/cpplex.c,
7489           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
7490           to switch _asm block preprocessing on / off. Default is
7491           #pragma preproc_asm +
7492
7493 2003-10-31  Borut Razem <borut.razem AT siol.net>
7494
7495         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
7496           when outputting comment blocks (when executed with -C option) and
7497           _asm (SDCPP specific) blocks
7498
7499 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7500
7501         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
7502
7503 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
7504
7505         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
7506
7507 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
7508
7509         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
7510         * src/SDCCast.c (decorateType): fixed bug #832664
7511
7512 2003-10-31  Borut Razem <borut.razem AT siol.net>
7513
7514         * support\cpp2\cpplex.c: fixed for SDCPP:
7515           comments(when executed with -C option) and _asm blocks
7516           were included even if they where in skipped #if block.
7517           Applied solution from GCC cpp 3.3.2
7518
7519 2003-10-31  Borut Razem <borut.razem AT siol.net>
7520
7521         * src/SDCC.lex: sdcc now understands both formats:
7522           '# <line_number> <file_name>' and
7523           '#line <line_number> <file_name>'
7524         * support/cpp2/cppmain.c: sdcpp now generates the standard
7525           '# <line_number> <file_name>' instead of former
7526           '#line <line_number> <file_name>'
7527
7528 2003-10-30  Borut Razem <borut.razem AT siol.net>
7529
7530         * support/cpp2/cpphash.h,
7531         * support/cpp2/cpplib.h
7532         * support/cpp2/cpplex.c,
7533         * support/cpp2/cppmain.c,
7534         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
7535
7536 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7537
7538         Fixed a number of problems revealed by bug #827883.
7539         * src/SDCCloop.c (loopInvariants): Spill location of the
7540         result operand should be recomputed if extracted from
7541         a loop. Also, don't extract assignments of an iTemp
7542         from a literal.
7543         * src/SDCCast.c (isConformingBody): loop reversal should
7544         not occur if the control variable is involved with a
7545         relational operator.
7546
7547 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
7548
7549         * .version: bumped to 2.3.6 to reflect the big improvements
7550         made by Erik and Klaus. Thanks!
7551
7552 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
7553
7554         Replaced the livrange code.
7555         * src/SDCClrange.c: added new LR code
7556         * src/SDCCloop.c,
7557         * src/SDCCBBlock.h: removed remainig parts from old LR code
7558         * src/ds390/ralloc.c,
7559         * src/ds390/gen.c: minor fixes to make it work with new code
7560
7561 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7562
7563         * as/hc08/asm.h,
7564         * as/hc08/lkrloc.c,
7565         * src/hc08/gen.c,
7566         * src/hc08/ralloc.c: Fix various warnings related to the hc08
7567         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
7568         (tweaked fix for bug #818696)
7569
7570 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7571
7572         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
7573
7574 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7575
7576         * src/SDCCmain.c,
7577         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
7578         * src/mcs51/gen.c (gencjneshort),
7579         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
7580         more efficient (per Scott Bronson's suggestion)
7581
7582 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7583
7584         Extended the semantics of the critical keyword to include
7585         individual statements. See RFE #827755 and #799831
7586         * src/SDCC.y
7587         * src/SDCCicode.c
7588         * src/SDCCopt.c
7589         * src/SDCCast.c
7590         * support/Util/SDCCerr.c
7591         * support/Util/SDCCerr.h
7592         * src/mcs51/gen.c
7593         * src/ds390/gen.c
7594         * src/hc08/gen.c
7595
7596 2003-10-19  Borut Razem <borut.razem AT siol.net>
7597
7598         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
7599
7600 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7601
7602         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
7603         Fixed bug #818696
7604         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
7605         and predecrement operand is displayed
7606
7607 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7608
7609         * src/SDCCval.c (valMinus): fixed bug #826041
7610
7611 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7612
7613         Some hc08 related updates that I missed earlier
7614         * sim/ucsim/stypes.h
7615         * support/regression/ports/hc08/spec.mk
7616
7617 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7618
7619         New target "hc08" for the Motorola 68hc08 family of micros
7620
7621         * configure
7622         * configure.in
7623         * Makefile
7624         * src/hc08/*
7625         * src/SDCCmain.c
7626         * src/port.h
7627         * sim/ucsim/hc08.src/*
7628         * sim/ucsim/configure.in
7629         * src/ucsim/configure
7630         * sim/ucsim/packages_in.mk
7631         * as/hc08/*
7632         * as/Makefile
7633         * device/include/mc68hc908qy.h
7634         * device/lib/hc08/*
7635         * device/lib/Makefile.in
7636         * support/regression/ports/hc08/*
7637         * support/regression/Makefile
7638
7639 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7640
7641         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
7642         regression test
7643         * src/ds390/gen.c (genCast): fixed bug #821957
7644
7645 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
7646
7647         * device/lib/logf.c: "fixed" overlay bug
7648         * support/regression/ports/host/spec.mk: added m library
7649         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
7650         * support/regression/tests/float_trans: added (for Eric)
7651
7652 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
7653
7654         * src/mcs51/gen.c (genCpl): fixed bug
7655         http://sf.net/mailarchive/message.php?msg_id=6263915
7656
7657 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
7658
7659         * src/SDCCast.c (decorateType): added extended constant folding
7660         * src/SDCCsymt.c (computeType): cleanup
7661         * src/SDCCval.c (valShift): minor optimization
7662         * support/regression/tests/ast_constant_folding.c: added
7663
7664 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7665
7666         * src/SDCCmain.c: removed some unintended changes
7667
7668 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7669
7670         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
7671         * src/z80/gen.c: fixed part of bug #817589
7672         * src/SDCCsymt.c (checkFunction): fixed bug #817895
7673
7674 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
7675
7676         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
7677         * src/SDCCcflow.c
7678         * src/SDCCcse.c
7679         * src/SDCCdflow.c
7680         * src/SDCClabel.c
7681         * src/SDCClrange.c
7682         * src/SDCCmem.c
7683         * src/SDCCopt.c
7684         * src/SDCCpeeph.c
7685         * src/SDCCset.c
7686         * src/avr/ralloc.c
7687         * src/ds390/ralloc.c
7688         * src/izt/ralloc.c
7689         * src/mcs51/ralloc.c
7690         * src/pic/ralloc.c
7691         * src/pic16/ralloc.c
7692         * src/xa51/ralloc.c
7693         * src/z80/ralloc.c
7694         * src/z80/gen.c: removed unused label "release:"
7695
7696 2003-10-06  Borut Razem <borut.razem AT siol.net>
7697
7698         * src/SDCC.lex: removed definition of unused variables
7699           save_optimize and save_options
7700
7701 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
7702
7703         * clean.mk: removed '=' in "-maxdepth=1"
7704         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
7705         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
7706
7707 2003-10-06  Borut Razem <borut.razem AT siol.net>
7708
7709         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
7710           my_unput() replaced by unput()
7711
7712 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
7713
7714         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
7715         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
7716         type-punned pointer will break strict-aliasing rules"
7717         Old LR behaviour is again default; Klaus' LR can be choosen by
7718         defining the environment variable LRKLAUS
7719         * src/SDCCBBlock.h
7720         * src/SDCCloop.c
7721         * src/SDCClrange.c
7722         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
7723         * clean.mk: fixed removal of files in bin/CVS/
7724         * device/lib/clean.mk: fixed removal of directories small and large
7725         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
7726         * src/SDCCicode.c,
7727         * src/SDCCval.c: removed superflous test for pedantic
7728
7729 2003-10-05  Borut Razem <borut.razem AT siol.net>
7730
7731         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
7732           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
7733           message "unmatched #pragma SAVE and #pragma RESTORE"
7734
7735 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
7736
7737         * doc/sdccman.lyx: various additions and updates (interrupts, inline
7738           assembly, critical functions, atomic, nojtbound)
7739
7740 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
7741
7742         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
7743         * src/SDCCBBlock.h
7744         * src/SDCCloop.c
7745         * src/SDCCloop.h
7746         * src/SDCClrange.c
7747
7748 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7749
7750         * src/z80/gen.h,
7751         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7752         * src/mcs51/gen.h
7753         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7754         * src/ds390/gen.h
7755         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
7756         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
7757         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
7758
7759 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7760
7761         * src/z80/gen.c (genRet): fixed bug #524753
7762         * src/z80/gen.c (genCast): fixed internal error on cast from
7763         pointer to long
7764         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
7765         fix for bug #477835 to the z80
7766         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
7767         for tracking iCodes in the peephole optimizer for z80
7768
7769 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7770
7771         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
7772         the other part of bug #814548
7773         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
7774
7775 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
7776
7777         * src/SDCCcse.c: fixed part of bug #814548
7778
7779 2003-09-28  Borut Razem <borut.razem AT siol.net>
7780
7781         * src/asm.c: rewrite of printILine() to use temporary file instead
7782           a pipe
7783         * src/xa51/main.c: commented out declaration of int rewinds
7784
7785 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7786
7787         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
7788
7789 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7790
7791         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
7792         * src/asm.c (printILine): Fixed bug #811015
7793
7794 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7795
7796         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
7797         freeing.
7798
7799 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7800
7801         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
7802         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
7803         to correctly handle general case of AOP_PAIRPTR
7804         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
7805
7806 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7807
7808         * src/mcs51/ralloc.c (fillGaps),
7809         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
7810         register positioning bug)
7811
7812 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
7813
7814         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
7815
7816 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7817
7818         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
7819         genCodePointerGet, genGenPointerGet, genFarPointerSet,
7820         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
7821         (ralloc doesn't intentionally do this now, but perhaps later)
7822         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
7823         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
7824         register positioning bugs (Fixed bug #762602 and #795325)
7825         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
7826         (Fixed bug #808779)
7827         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
7828         lines that --i-code-in-asm generates
7829
7830 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7831
7832         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
7833         trying to fclose a FILE* that was already closed.
7834
7835 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7836
7837         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
7838         of const struct should be treated as if const themselves)
7839
7840 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
7841
7842         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
7843
7844 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7845
7846         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
7847         Unix (/n) and DOS (/r/n) line terminations.
7848
7849 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7850
7851         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
7852         bug #613775
7853
7854 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7855
7856         * src/mcs51/gen.c (genFunction, genEndFunction),
7857         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
7858         and restore of EA so that stack offsets to parameters are
7859         correct when using both critical and reentrant/stack-auto.
7860         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
7861         size (can be triggered in error if sloc is shared between
7862         different sized objects)
7863         * device/include/float.h: fixed macros to explicitly use
7864         unsigned long where needed
7865
7866 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
7867
7868         Feature req. 799831: added code to allow nesting of critical functions
7869         * src/mcs51/gen.c (genFunction, genEndFunction)
7870         * src/ds390/gen.c (genFunction, genEndFunction)
7871
7872 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7873
7874         * src/SDCCsymt.c (sclsFromPtr),
7875         * src/SDCCsymt.h,
7876         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
7877         support for standard C idiom of memory mapped variables; for
7878         example, *((xdata int*)0x1234) = 1 is now internally equivalent
7879         to xdata int at 0x1234 tempvar = 1.
7880         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
7881         provided by Akiya ISHIDA
7882
7883 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
7884
7885         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
7886         * src/SDCCval.c (constVal): added reduction from int to char
7887         * src/SDCCval.c (valMult, valDiv): fixed sign handling
7888         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
7889         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
7890         to ignore the sign
7891         * support/regression/tests/shifts.c: fixed
7892
7893 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7894
7895         * src/z80/gen.c (genXor): Fixed bug #805445
7896
7897 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7898
7899         Fixed bug #621531 (const & volatile confusion in the type chain).
7900         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
7901         refer to the const or volatile state of the pointer itself.
7902
7903         * src/SDCCast.c
7904         * src/SDCCglue.c
7905         * src/SDCCicode.c
7906         * src/SDCCsymt.c
7907         * src/SDCCval.c
7908         * src/SDCC.y
7909         * src/SDCCsymt.h
7910         * src/pic/gen.c
7911         * src/pic/ralloc.c
7912         * src/pic16/gen.c
7913         * src/pic16/ralloc.c
7914         * support/regression/tests/const.c
7915
7916 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
7917
7918         When checking for duplicated modules, use absolute paths
7919         instead of relative paths.  Files changed:
7920
7921         * as/mcs51/lklib.c
7922         * link/z80/lklib.c
7923
7924 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7925
7926         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
7927
7928 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7929
7930         * device/include/string.h: added size_t typedef, changed
7931         prototypes to use size_t, eliminated separate reentrant and
7932         non-reentrant declarations, added _memmove declaration
7933         * device/lib/_memcpy.c: changed to use size_t instead of int,
7934         changed /4 to >>2 to avoid division library call
7935         * device/lib/_memcmp.c,
7936         * device/lib/_memset.c,
7937         * device/lib/_strncat.c,
7938         * device/lib/_strncpy.c,
7939         * device/lib/_strncmp.c: changed to use size_t instead of int
7940         * device/lib/_memmove.c: new file (fixed bug #772294)
7941         * device/lib/Makefile.in: added _memmove.c
7942         * device/lib/z80/asm_strings.s: fixed bug #772290
7943         * support/regression/tests/bitfields.c: attempt to fix host assertion
7944         failure on amd64-unknown-linux2.2
7945
7946 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7947
7948         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
7949         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
7950         * as/z80/asmain.c (main): fixed bug #801766
7951
7952 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
7953
7954         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
7955         compilers
7956
7957 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7958
7959         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
7960         reported in bug #800609
7961
7962 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
7963
7964         * Top header beautifications in src/pic16 directory:
7965           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
7966           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
7967           pcoderegs.h, ralloc.c, ralloc.h
7968         * main.c: added top header and GPL license notice
7969         * pcode.c: fixed the if-conditional warning
7970
7971 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
7972
7973         * device/lib/_mullong.c: replaced int by short for gcc
7974
7975 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
7976
7977         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
7978         and JUMPTABLE iCodes properly now (worked by accident before)
7979         * src/mcs51/gen.c (leftRightUseAcc),
7980         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
7981         iCode properly now. Use getSize instead of nRegs since a & b
7982         aren't part of the nRegs tally.
7983
7984 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
7985
7986         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
7987         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
7988           before instructions that use the _STATUS register
7989
7990 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
7991
7992         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
7993         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
7994         fetching of the pointer
7995         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
7996         copied from genNearPointerSet()
7997         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
7998         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
7999         If they pop r0/r1 they must be called in the opposite order than aopOp().
8000         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
8001         (resp. --stack-auto), prepared for --xstack
8002
8003 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8004
8005         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
8006
8007 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
8008
8009         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
8010         these ports have their own __sdcc_external_start()
8011
8012 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
8013
8014         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8015         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
8016         type for bits was changed. It resulted in bit variables becoming
8017         global, which is not permitted in PIC 14 assembly output.
8018
8019 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8020
8021         * doc/sdccman.lyx: various additions and updates. Rearranged sections
8022
8023 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8024
8025         Z80 and MCS51 linkers complaint if a public symbol is defined
8026         in more than one library module:
8027
8028         * as/mcs51/lklib.c
8029         * link/z80/lklib.c
8030         * as/mcs51/Makefile.in
8031
8032 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8033
8034         A few small changes that speed up the peephole optimizer.
8035
8036         * src/SDCCpeeph.c
8037
8038 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8039
8040         Try to make the peephole optimizer smarter by maintaining
8041         an association between the assembly source code and the
8042         iCodes that originated them. Put this information to use
8043         with a new peephole rule condition "notVolatile" so that
8044         the rules can be aggressive yet still safe.
8045
8046         * src/SDCCpeeph.c
8047         * src/SDCCpeeph.h
8048         * src/mcs51/gen.c
8049         * src/mcs51/peeph.def
8050
8051 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8052
8053         Fixed bug #741761
8054
8055         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
8056         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
8057         if the left or right operand symbols have the accuse flag set.
8058
8059 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8060
8061         Changed the type of the result of the ! (NOT) operator to char;
8062         previously it returned the same type as the source. This allows
8063         us to eliminate all the genFloatNot functions (all of its target
8064         implementations were very buggy) since !float can use the same
8065         code as !long now.
8066
8067         * src/SDCCicode.c (ast2iCode): ! returns char
8068         * src/mcs51/gen.c (genNot, genNotFloat),
8069         * src/ds390/gen.c (genNot, genNotFloat),
8070         * src/z80/gen.c (genNot, genNotFloat),
8071         * src/pic/gen.c (genNot, genNotFloat),
8072         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
8073
8074 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
8075
8076         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
8077         1. Interrupt would not compile properly. Ensure PCLATH register is saved
8078            during interrupts. Ensure WSAVE is located at a shared bank address.
8079         2. Fixed page selection in some places
8080         3. Fixed BTFSS/C to where necessary use registers directly and not simply
8081            the registers name strings.
8082         4. Fixed "signed / unsigned compare" compiler warnings.
8083         5. The PIC port manages its own allocation of the general purpose
8084            registers, but makes no attempt to reuse them. As a result when
8085            compiling it soon runs out of general purpose registers. Some
8086            additional code was added to the files pcode.c and device.c to walk
8087            through the function call tree and rename the registers so that they
8088            get reused.
8089
8090         * src/pic/device.c
8091         * src/pic/gen.c
8092         * src/pic/glue.c
8093         * src/pic/pcode.c
8094         * src/pic/pcode.h
8095         * src/pic/ralloc.c
8096         * src/pic/ralloc.h
8097         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
8098         genPlus() & genMinus() when the result is the same as left or right
8099
8100 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8101
8102         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
8103
8104 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8105
8106         Made bitfield a distinct type from bit so that bitfields
8107         convert as per ANSI C and bits retain their traditional
8108         boolean style behaviour. Implemented bitfield support in
8109         the z80 port.
8110
8111         * src/SDCCsymt.h,
8112         * src/SDCCsymt.c,
8113         * src/SDCCast.c,
8114         * src/cdbFile.c,
8115         * src/mcs51/gen.c,
8116         * src/ds390/gen.c: bit v bitfield split
8117         * src/z80/gen.c: New support for bitfields
8118         * support/regression/tests/bitfields.c: reenabled z80,
8119         added more tests
8120
8121 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8122
8123         Rules 246.x, 247.x relate to bitfields, the others speed up
8124         access to xdata mapped I/O devices.
8125
8126         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
8127
8128 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8129
8130         Cleaned up genPackBits and genUnpackBits and added two helper
8131         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
8132         for literal assignments in genPackBits (thanks to Frieder for
8133         reminding me).
8134
8135         * src/mcs51/gen.c
8136         * src/ds390/gen.c
8137
8138 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8139
8140         Fixed bug #748310 (pointer to function type mishandled when the
8141         function name is omitted). Also fixed a SIGSEGV when a function
8142         attribute (reentrant, etc) is used on a non-function or on a
8143         function but misplaced before the parameter list.
8144
8145         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
8146         bug #748310
8147         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
8148         * support/Util/SDCCerr.h,
8149         * support/Util/SDCCerr.c: Added func attr misuse error msg
8150
8151 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8152
8153         Fixed bug #787649 by anonymous
8154         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
8155         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
8156
8157 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8158
8159         Fixed numerous bitfield problems.
8160
8161         * src/SDCC.y: More bitfield related error checking
8162         * src/SDCCsymt.h,
8163         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
8164         * support/Util/SDCCerr.h,
8165         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
8166         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8167         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
8168         * support/regression/tests/bitfields.c: tests added
8169
8170 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8171
8172         Made the constant following the "interrupt" keyword optional. If
8173         omitted, the function will not automatically be given an entry
8174         in the interrupt vector table (similar to #pragma NOIV, but
8175         less syntacticly kludgy). The interrupt number is also now
8176         range checked. Also fixed a bug in the high order bit example
8177         in the manual.
8178
8179         * src/SDCC.y
8180         * src/SDCCmem.c
8181         * src/SDCCglue.c
8182         * src/SDCCsymt.h
8183         * support/Util/SDCCerr.c
8184         * support/Util/SDCCerr.h
8185         * doc/sdccman.lyx
8186
8187 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
8188
8189         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
8190         * src/SDCCicode.c (operandOperation): rewritten some ops
8191         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
8192         * src/SDCCsymt.c (computeType): literals are handled the same way as any
8193         other type
8194         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
8195         be re-activated by defining REDUCE_LITERALS)
8196         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
8197         unsigned, but are signed by default
8198         * src/SDCCval.c (constVal): rearranged
8199         * src/SDCCval.c (valMod): preliminary fix
8200         * src/SDCCval.c (valCastLiteral): use TYPE_* types
8201         * support/regression/literalop.c: added, work in progress
8202
8203 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8204
8205         Generate warnings for useless declarations like "char data;"
8206         that don't do what new users expect.
8207
8208         * src/SDCC.y
8209         * support/Util/SDCCerr.h
8210         * support/Util/SDCCerr.c
8211
8212 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
8213
8214         * src/SDCCval.c (valMult): fix overflow detection of negative int
8215
8216 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8217
8218         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
8219
8220         Changes to support big endian targets:
8221
8222         * src/ports.h
8223         * src/SDCCglue.c
8224         * src/avr/main.c
8225         * src/ds390/main.c
8226         * src/izt/i186.c
8227         * src/mcs51/main.c
8228         * src/pic/main.c
8229         * src/pic16/main.c
8230         * src/xa51/main.c
8231         * src/z80/main.c
8232
8233 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
8234
8235         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
8236         * device/lib/time.c: fixed warning "integer overflow in expression"
8237
8238 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
8239
8240         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
8241         * src/SDCCval.c (constVal): changed default to signed; hex and octal
8242         constants are unsigned; added recognition of "u" flag for unsigned
8243         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
8244         * src/SDCCval.c (valDiv, valMod): fixed signdness
8245         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
8246         signedness of modulo, left and right shift
8247         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
8248         * support/Util/SDCCerr.h: added warning W_INT_OVL
8249         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
8250         * src/SDCCast.c (ast_print): improved output of constants
8251
8252 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8253
8254         Fixed some warnings when building with MSVC:
8255
8256         * as\mcs51\asdata.c
8257         * as\z80\asdata.c
8258         * as\mcs51\asm.h
8259         * as\z80\asm.h
8260         * link\z80\aslink.h
8261         * link\z80\lkdata.c
8262         * link\z80\lkeval.c
8263         * link\z80\lkgb.c
8264         * link\z80\lkihx.c
8265         * link\z80\lks19.c
8266         * link\z80\lksym.c
8267         * support\cpp2\cpplib.c
8268         * src\ds390\gen.c
8269         * src\mcs51\gen.c
8270
8271 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
8272
8273         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
8274
8275 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8276
8277         * support\librarian\clean.mk: Do not remove Makefile.
8278         * support\librarian\Makefile: added.
8279
8280 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8281
8282         Added librarian to MSVC build:
8283         * all.dsp
8284         * sdcc.dsw
8285         * support\librarian\librarian.dsp
8286
8287         'configure' not needed for librarian, removed:
8288         * support\librarian\configure
8289         * support\librarian\configure.in
8290         * support\librarian\config_in.h
8291         * support\librarian\Makefile.in
8292
8293         Hopefully these ones built the librarian and the rest of sdcc properly:
8294         * Makefile
8295         * Makefile.common.in
8296
8297         Messed up 'configure', so revert to previous version:
8298         * configure
8299         * configure.in
8300
8301 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
8302
8303         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
8304         there, while the mantissa of a double is "only" 53 bits wide.
8305
8306 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8307
8308         Adding sdcclib to the build.  MSVC project coming soon.
8309         Files added/changed:
8310
8311         * support\librarian\clean.mk
8312         * support\librarian\configure
8313         * support\librarian\configure.in
8314         * support\librarian\config_in.h
8315         * support\librarian\Makefile.bcc
8316         * support\librarian\Makefile.in
8317         * support\librarian\sdcclib.c
8318         * Makefile.bcc
8319         * Makefile
8320         * Makefile.common.in
8321         * configure
8322         * configure.in
8323
8324 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8325
8326         Linker now complaints if linked modules have conflicting options, for
8327         example, one compiled using --model-large and another one compiled with
8328         --model-small.  The following files were modified:
8329
8330         * as\mcs51\asdata.c
8331         * as\mcs51\aslink.h
8332         * as\mcs51\asm.h
8333         * as\mcs51\asmain.c
8334         * as\mcs51\asout.c
8335         * as\mcs51\i51pst.c
8336         * as\mcs51\lkdata.c
8337         * as\mcs51\lklibr.c
8338         * as\mcs51\lkmain.c
8339         * as\z80\asdata.c
8340         * as\z80\asm.h
8341         * as\z80\asmain.c
8342         * as\z80\asout.c
8343         * as\z80\z80pst.c
8344         * link\z80\aslink.h
8345         * link\z80\lkdata.c
8346         * link\z80\lklibr.c
8347         * link\z80\lkmain.c
8348         * src\SDCCglue.c
8349
8350 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8351
8352         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
8353         as/mcs51/lklibr.c: Generate a warning when a library is not found.
8354
8355 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
8356
8357         * src/z80/mappings.i: fix _mul[us][int,long] entries
8358
8359 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8360
8361         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
8362
8363 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8364
8365         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
8366         * support/regression/tests/bitopcse.c: added
8367         fixed warning:
8368         * src/avr/gen.c:
8369         * src/pic/gen.c:
8370         * src/pic16/gen.c:
8371         * src/z80/gen.c:
8372         * src/xa51/gen.c:
8373
8374 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8375
8376         added support for new library format to z80, gbz80 linkers:
8377         *link/z80/aslink.h
8378         *link/z80/lklex.c
8379         *link/z80/lklib.c
8380         *link/z80/lklist.c
8381
8382 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
8383
8384         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
8385         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
8386
8387 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
8388
8389         added DUMMY_READ_VOLATILE:
8390         * src/SDCC.y:
8391         * src/avr/gen.c:
8392         * src/xa51/gen.c:
8393         * src/z80/gen.c:
8394         * src/pic/gen.c:
8395         * src/pic16/gen.c:
8396         * src/mcs51/gen.c:
8397         * src/ds390/gen.c:
8398         * src/SDCCcse.c (algebraicOpts): many improvements
8399         * src/SDCCcse.h: removed algebraicOpts()
8400         * src/SDCCicode.c (picDummyRead): added
8401
8402 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8403
8404         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
8405         "Insufficient space in data memory".
8406
8407 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8408
8409         * src/mcs51/gen.c: fixed bug #771358
8410         * src/z80/gen.c: fixed bug #759087
8411
8412 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
8413
8414         * src/pic16/glue.c: minor cleanup by Vangelis
8415
8416 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8417
8418         * device/include/regc515c.h: fixed #758477
8419         * device/lib/_gptrget.c: saving some cycles in generic pointer get
8420         * device/lib/_gptrput.c: saved a few bytes
8421         * my tab spacing is 8, yours too?)
8422         * device/lib/_ser.c: process RX bytes earlier than TX bytes
8423         * device/lib/serial.c: process RX bytes earlier than TX bytes
8424         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
8425
8426 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
8427
8428         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
8429
8430 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8431
8432     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
8433
8434 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
8435
8436         * device/lib/Makefile.in: bad fix, reverted to 1.43
8437
8438 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
8439
8440         * device/lib/Makefile.in: added missing z80 object files
8441
8442 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
8443
8444         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
8445         pic16 progress by Vangelis:
8446         * src/SDCCglobl.h:
8447         * src/SDCCmain.c:
8448         * src/pic/Makefile:
8449         * src/pic:
8450         * pic/Makefile:
8451         * pic16/device.c:
8452         * pic16/device.h:
8453         * pic16/gen.c:
8454         * pic16/gen.h:
8455         * pic16/genarith.c:
8456         * pic16/glue.c:
8457         * pic16/main.c:
8458         * pic16/pcode.c:
8459         * pic16/pcode.h:
8460         * pic16/pcodepeep.c:
8461         * pic16/peeph.def:
8462
8463 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8464
8465     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
8466
8467 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8468
8469     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
8470     added gbz80 build to MSVC project.
8471     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
8472     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
8473     from 8051 stuff and setup so it links using a .lnk file.
8474
8475 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8476
8477     * support/librarian/sdcclib.c: sdcc librarian.
8478     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
8479     with sdcclib.
8480
8481 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8482
8483     * as/mcs51/lkmain.c: properly handle extensions in function afile.
8484
8485 2003-07-02  Borut Razem <borut.razem AT siol.net>
8486
8487         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
8488         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
8489         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
8490         src/xa51/main.c, src/z80/main.c:
8491         virtualization of glue() function: each port has it's own glue function,
8492         which is accessed by do_glue function pointer in PORT.general structure
8493
8494 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
8495
8496         * DS800C400 fun, improved ROM interface and tinibios.
8497
8498 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
8499
8500         * More support for DS80C400. Now includes beginning of interface to ROM.
8501
8502 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
8503
8504         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
8505
8506 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8507
8508         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
8509
8510 2003-06-19  Borut Razem <borut.razem AT siol.net>
8511
8512         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
8513
8514 2003-06-19  Borut Razem <borut.razem AT siol.net>
8515
8516         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
8517         fixed Z80 port - crt0.o: cannot open.
8518
8519 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
8520
8521         * support/Util/MySystem.c (merge_command): revert bad fix
8522
8523 2003-06-18  Borut Razem <borut.razem AT siol.net>
8524
8525         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
8526
8527 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8528
8529         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8530         option --use-stdout sends errors to stdout instead of stderr.
8531
8532 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
8533
8534         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
8535
8536 2003-06-15  Borut Razem <borut.razem AT siol.net>
8537
8538         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
8539         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
8540         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
8541         fixed width array of pointers replaced with sets;
8542         multiple include and lib paths ared transferred to preprocessor and linker
8543         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
8544         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
8545         fixed width array of pointers
8546         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
8547         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
8548         fixupPath(), getPathDifference()
8549         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
8550         fixed width array of pointers
8551
8552 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
8553
8554         * src/pic16/ralloc.c: fix warnings
8555         * src/pic16/pcode.c: fix warning
8556
8557 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
8558
8559          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
8560         know all the details, but essentially this set of changes enable
8561         the pic16 port to generate movff instructions and generate assembler
8562         directives,
8563         * src/SDCCmain.c:
8564         * src/pic16/gen.c:
8565         * src/pic16/glue.c:
8566         * src/pic16/pcode.c:
8567         * src/pic16/device.c:
8568         * src/pic16/main.c:
8569         * src/pic16/pcode.h:
8570         * src/pic16/pcoderegs.c:
8571         * src/pic16/ralloc.c:
8572         * src/pic16/ralloc.h:
8573
8574 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8575
8576         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
8577         added option --vc, so sdcc errors and warnings are compatible with
8578         Microsoft Visual Studio.
8579
8580 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8581
8582         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
8583           device/lib/libfloat.lib: added atof function.
8584
8585 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
8586
8587         * doc/sdccman.lyx: updated to Lyx 1.3
8588         * doc/cdbfileformat.lyx: updated to Lyx 1.3
8589         * doc/test_suite_spec.lyx: updated to Lyx 1.3
8590         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
8591
8592 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
8593
8594         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
8595
8596 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8597
8598         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
8599           additions to the "related tools/documentation" section
8600
8601 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
8602
8603         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
8604
8605 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
8606
8607         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
8608         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
8609
8610 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
8611
8612         * doc/sdccman.lyx: fix double dash and other minor things
8613         * doc/Makefile: fix double dash
8614
8615 2003-05-28  Karl Bongers(patches from Martin Helmling)
8616         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
8617           condition and ignore commands.
8618
8619 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8620
8621         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
8622           is in parts still quite out of date, I did changes as far as I felt makes sense
8623           for a non-native english speaker.
8624           Please feel free to add to the manual or to correct my changes.
8625         * doc/Makefile: undid touching the date of intermediate tex files.
8626
8627 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8628
8629         * doc/sdccman.lyx: Manual has an index now
8630
8631 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
8632
8633         Finalize muluint/mulsint and mululong/mulslong merging:
8634         * device/lib/_mulint.c
8635         * device/lib/_mullong.c
8636         * device/lib/gbz80/mul.s
8637         * device/lib/gbz80/stubs.s
8638         * device/lib/z80/mul.s
8639         * device/lib/z80/stubs.s
8640         * src/SDCCsymt.c (initCSupport)
8641
8642 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8643
8644         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
8645         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
8646           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
8647           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
8648           instead of /Zm500.
8649
8650 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
8651
8652         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
8653           the regression tests I'm not brave enough to enable 245.b, 245.c
8654         * doc/sdccman.lyx: added latex preamble for hyperref package.
8655           Using pdflatex this will give you a hyperlinked pdf file with
8656           bookmarks. (prepend '%' before /usepackage if this breaks something)
8657
8658 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8659
8660          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
8661
8662 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
8663
8664         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
8665
8666 2003-05-21    <johan AT balder>
8667
8668         * src/SDCCglue.c (printIval): fixed bug #739934
8669
8670 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8671
8672         Applied patch from bug 737905 (renamed yylineo to mylineno):
8673         * src/altlex.c
8674         * src/SDCCast.c
8675         * src/SDCglobl.h
8676         * src/SDCC.lex
8677         * src/SDCCsymt.c
8678         * src/SDCCval.c
8679         * src/pic16/pcode.c: Cleaned warnings
8680         * src/pic16/pcodeflow.c: Cleaned warnings
8681         * src/pic16/pcoderegs.c: Cleaned warnings
8682
8683 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
8684
8685         * src/pic16/pcode.c: Cleaned warnings
8686         * src/pic16/pcodepeep.c: Cleaned warnings
8687         * src/pic16/ralloc.c: Cleaned warnings
8688
8689 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
8690
8691         * doc/sdccman.lyx: fixed bug 739745
8692         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
8693
8694 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
8695
8696         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
8697         it can be defined with CFLAGS when running configure
8698         * src/SDCCmain.c: fixed compiling + linking with object files
8699
8700 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
8701
8702         * configure.in: configure for pic16 port,
8703             added --disable-pic16-port
8704         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
8705         * src/SDCCmain.c: linkOptions is changed to set *,
8706             added if/endif conditional macros to remove options help
8707             messages from optionsTable when a port is not configured, added
8708             support for the PIc16 port in the ports table, when executing
8709             the compiler with no port specified on command line, a default
8710             port is selected with the new macro DEFAULT_PORT which is
8711             defined in port.h, in setDefaultOptions() linkOptions is removed
8712             from initialization assignment, since now it is a set,
8713             parseCmdLine uses setParseWithComma for linkOptions, in
8714             linkEdit() linkOptions are accessed with new function indexSet()
8715             which returns the i'th item of a set variable. See SDCCset.c, in
8716             linkEdit() when calling buildCmdLine(), added linkOptions as
8717             last argument. Now users can pass arguments to gplink via the
8718             -Wl option, main() uses pic16glue() to glue up pic16 programs
8719         * src/SDCCpeeph.c: various changes to support pic16
8720         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
8721             return the i'th item of the set
8722         * src/SDCCset.h: added function prototype for indexSet()
8723         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
8724         * src/clean.mk: added pic16 in CLEANALLPORTS variable
8725         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
8726             added macro DEFAULT_PORT
8727         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
8728         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
8729             generated
8730         * src/pic16/glue.c: commented out some error producing lines
8731         * src/pic16/main.c: __config directives are commented out to stop
8732             gpasm complaining and test the linkage with gplink, _linkCmd and
8733             _asmCmd changed to be more gplink and gpasm friendly
8734         * src/pic16/peeph.def: peep rule 3 is commented out, since it
8735             produced an error when parsed, peep rule 12 is added to utilize
8736             movff, but it is commented out since the pCode does not support
8737             yet a command with 2 address arguments
8738
8739 2003-05-18    <johan AT balder>
8740
8741         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8742         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
8743 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
8744
8745         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
8746   Added feature to script commands from file.
8747
8748 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
8749
8750         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
8751         * src/SDCCutil.c: include ctype.h for win32
8752
8753 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
8754
8755         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
8756
8757 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
8758
8759         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
8760   Fixed so you can set breakpoints prior to run, run does not stop
8761   on entry now.  Add tbreak.  Other enhancements and fixes for use
8762   with ddd.
8763
8764 2003-05-12  Borut Razem <borut.razem AT siol.net>
8765
8766         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
8767
8768 2003-05-11  Borut Razem <borut.razem AT siol.net>
8769
8770         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
8771         the path of bin directory, so that PATH is the only env. variable, which has to be set
8772         in case of standard installation.
8773         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
8774         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
8775         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
8776
8777 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8778
8779         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
8780         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
8781         temp files are in the port dir; clean the gen/test directory when
8782         generating new test.c
8783         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
8784         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
8785         * support/regression/tests/zeropad.c: added
8786
8787 2003-05-09    <johan AT balder>
8788
8789         * src/SDCCglue.c: fixed bug #597940
8790
8791 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
8792
8793         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8794   cache sfr, optimize next,step, fix off by one sourceline,
8795   support ddd list function.
8796         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
8797
8798 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
8799
8800         * support/regression/HTMLgen.py: added compare_s2f()
8801         * support/regression/Makefile: redo 1.27
8802         * support/regression/generate-cases.py: redo 1.5
8803
8804 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
8805
8806         * support/regression/tests/float.c: workaround 33 bit hex constant
8807         * support/regression/tests/simplefloat.c: fix division for host
8808
8809 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
8810
8811         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
8812         that tame's the PIC's over-aggressive optimizer.
8813
8814 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
8815
8816          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
8817          support for MSVC.
8818
8819 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
8820
8821         Initial support for DS80C400. "Hello world" runs on TINIm400
8822         (with polled I/O).
8823
8824 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
8825
8826          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
8827          * Some notes on ddd usage added in debugger/README
8828          Martin Helmling adding more features and fixes for ddd GUI debugger.
8829          Code added for nexti, stepi, up, down, and other adjustments.
8830
8831 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
8832
8833         * src/pic/pCodepeep.c non-wildcard asmops are now handled
8834         * src/pic/peeph.def Added two rules to optimize carry manipulation
8835         * src/pic/* removed debug printfs
8836
8837 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
8838
8839         * debugger/mcs51/cmd.c: added header newalloc.h
8840
8841 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
8842
8843         * as/Makefile: new EXEEXT
8844         * as/z80/Makefile: remove trailing slash of BUILDIR
8845         * as/z80/clean.mk: new EXEEXT
8846         * Makefile.common.in: add to CFLAGS (and others), don't replace it
8847         * support/cpp2/Makefile.in: new EXEEXT
8848         * src/pic/glue.c (pic14emitRegularMap): fixed warning
8849
8850 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
8851
8852         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
8853         EXEEXT was introduced to fix all related problems with targets
8854         "clean", "install" and "uninstall"; a couple of further flaws
8855         especially with "clean" have been fixed too
8856         * as/mcs51/Makefile.in
8857         * as/mcs51/clean.mk
8858         * as/z80/Makefile
8859         * Makefile
8860         * clean.mk
8861         * debugger/mcs51/Makefile.in
8862         * debugger/mcs51/clean.mk
8863         * link/z80/Makefile
8864         * link/z80/Makefile.in
8865         * link/z80/clean.mk
8866         * link/Makefile
8867         * packihx/Makefile.in
8868         * packihx/clean.mk
8869         * sim/ucsim/Makefile
8870         * sim/ucsim/clean.mk
8871         * sim/ucsim/avr.src/Makefile.in
8872         * sim/ucsim/avr.src/clean.mk
8873         * sim/ucsim/s51.src/Makefile.in
8874         * sim/ucsim/s51.src/clean.mk
8875         * sim/ucsim/xa.src/Makefile.in
8876         * sim/ucsim/xa.src/clean.mk
8877         * sim/ucsim/z80.src/Makefile.in
8878         * sim/ucsim/z80.src/clean.mk
8879         * sim/ucsim/main_in.mk
8880         * sim/ucsim/packages_in.mk
8881         * sim/ucsim/gui.src/Makefile.in
8882         * sim/ucsim/gui.src/serio.src/Makefile.in
8883         * sim/ucsim/gui.src/serio.src/clean.mk
8884         * src/Makefile.in
8885         * src/clean.mk
8886         * support/cpp2/Makefile.in
8887         * support/cpp2/clean.mk
8888         * support/makebin/Makefile
8889         * support/makebin/clean.mk
8890         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
8891         * doc/sdccman.lyx: --program-suffix no longer needed
8892
8893 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
8894
8895          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
8896          Martin Helmling added support for ddd GUI debugger.
8897          Code added to display assembly, set variables, and other commands
8898          to interface to ddd.
8899
8900 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
8901
8902         * as/Makefile: fix target clean
8903         * as/clean.mk: fix target clean
8904         * as/z80/clean.mk: fix target clean
8905
8906 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
8907
8908         * Makefile.common.in: added  AT EXEEXT AT
8909         * configure.in: removed all mingw32 stuff
8910         * configure: rebuilt from configure.in
8911         * doc/sdccman.lyx: updated section "installation"
8912         * support/scripts/sdcc_mingw32: adapted to configure
8913         * support/scripts/sdcc_cygwin_mingw32: added
8914
8915 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
8916
8917         * src/pic Added object file support for the PIC port
8918         * src/pic Applied patch from Craig Franklin (this started the object file support)
8919         * src/regression Updated the PIC regression tests for object files
8920
8921 2003-04-20  Borut Razem <borut.razem AT siol.net>
8922
8923         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
8924           lklex.c: In function `getfid':
8925           lklex.c:203: warning: array subscript has type `char'
8926         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
8927           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
8928         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
8929           stack handling macros
8930
8931 2003-04-19  Borut Razem <borut.razem AT siol.net>
8932
8933         * "handling space characters in file path" task:
8934         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
8935         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
8936         * support/Util/MySystem.h: make it self-sufficient
8937         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
8938           src/z80/main.c, sdcc/as/mcs51/lklex.c:
8939           handling space characters in file path
8940         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
8941           (it will be used by assemblers, which have their own includes, e.g. gpasm)
8942         * support/Util/MySystem.c: handling space characters in executable's path
8943
8944 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
8945
8946         * as/z80/Makefile: fix permanent rebuild of z80
8947         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
8948         * support/regression/tests/bitfields.c: added Johan's bitfields.c
8949
8950 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
8951
8952         * src/SDCCopt.c: add special case optimization to replace modulo by
8953           a power of two with a bitwise AND.
8954
8955 2003-04-18    <johan AT balder>
8956
8957         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
8958
8959 2003-04-17    <johan AT balder>
8960
8961         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
8962         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
8963
8964 2003-04-13  Borut Razem <borut.razem AT siol.net>
8965
8966         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
8967         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
8968           fixed mingw problem in adl_NORMALIZE_PATH
8969
8970 2003-04-12  Borut Razem <borut.razem AT siol.net>
8971
8972         * fixed "#pragma SAVE/RESTORE can not be nested":
8973         * src/SDCC.lex: reworked pragma handling functions
8974         * sdcc/src/SDCCglobl.h: reworked stack handling macros
8975         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
8976
8977 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
8978
8979         * src/SDCCutil.c (pathEquivalent): defined but not used
8980         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
8981         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
8982         * configure: rebuilt from configure.in
8983         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8984         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
8985         * device/include/Makefile.in: replace sdcc_datadir
8986         * device/lib/Makefile.in: replace sdcc_datadir
8987         * Makefile.common.in: add LDFLAGS from configure
8988         * packihx/Makefile.in: use LDFLAGS
8989         * src/Makefile.in: use LDFLAGS
8990         * support/cpp2/Makefile.in: add LDFLAGS from configure
8991         * support/makebin/Makefile: use LDFLAGS
8992         * .version: bumped version number to 2.3.5
8993
8994 2003-04-12  Borut Razem <borut.razem AT siol.net>
8995
8996         * completed "different paths" task:
8997         * src/SDCCmacro.c: fixed bug in handling quotes
8998         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
8999         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
9000
9001 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
9002
9003         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
9004
9005 2003-04-11 kevin Vigor <kevin AT vigor.nu>
9006
9007         * ds390/gen.c ds390/peeph.def: fix bug 706781
9008
9009 2003-04-11  Borut Razem <borut.razem AT siol.net>
9010
9011         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
9012
9013 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
9014
9015         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
9016         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
9017          set - this bit used to not be set...).
9018         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
9019           bad code in PIC Port
9020         * src/regression/and2.c added to test bug 609268
9021         * src/regression/Makefile added and2.c to regression test
9022
9023
9024 2003-04-08    <johan AT CP255758-A>
9025
9026         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
9027         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
9028         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
9029
9030 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
9031
9032         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
9033         fix bug #487815
9034         * support/cpp2/Makefile.in: fix bug #487815
9035         * configure: rebuilt from configure.in
9036         * Makefile.common.in: docdir changed, new path suffixes
9037         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9038         * sdcc_vc_in.h: reflect changes from sdccconf.h
9039         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
9040         * src/SDCCutil.h: remove BINDIR hack
9041         * doc/sdccman.lyx: update new path hierarchy
9042
9043 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9044
9045         * src/SDCCpeeph.c: added okToRemoveSLOC test
9046
9047 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9048
9049         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
9050
9051 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
9052
9053         * src/SDCCpeeph.c: added labelIsReturnOnly test
9054         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
9055
9056 2003-04-05    <johan AT balder>
9057
9058         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
9059         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
9060         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
9061         * src/SDCCast.c: fixed a warning
9062         * src/SDCCast.h: fixed a warning
9063         * src/SDCCicode.c (operandFromAst): fixed a warning
9064
9065 2003-04-04    <johan AT balder>
9066
9067         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
9068         * src/SDCCast.c (decorateType): fixed bug #715076
9069         * src/SDCC.y: fixed bug #702907
9070
9071 2003-04-03    <johan AT balder>
9072
9073         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
9074         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
9075         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
9076         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
9077         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
9078
9079 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
9080
9081         * _decdptr.c: fix return values
9082         * _gptrget.c: fix return values
9083         * _gptrgetc.c: fix return values
9084         * _gptrput.c: fix return values
9085         * _mulint.c: fix return values
9086         * as/z80/Makefile: fix 'make -j' problem
9087
9088 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
9089
9090         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
9091         * configure.in: big cleanup, updated to autoconf 2.5x
9092         * configure: rebuilt from configure.in
9093         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
9094         * sdcc_vc_in.h: reflect changes from sdccconf.h
9095         * doc/Makefile: fixed a flaw in "make install"
9096
9097 2003-04-02    <johan AT balder>
9098
9099         * src/ds390/gen.c (genCmp): no comments
9100         * src/mcs51/gen.c (genCmp): no comments
9101         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
9102         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
9103
9104 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
9105
9106         * support/regression/generate-cases.py: place generated file in given sub directory
9107         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
9108         * support/regression/Makefile: improvements for 'make -j';
9109         side effect: it's simpler and faster now
9110
9111 2003-03-31  Borut Razem <borut.razem AT siol.net>
9112
9113         * src/z80/main.c: link-{port} and as-{port} defined without path
9114         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
9115
9116 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
9117
9118         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
9119
9120 2003-03-30  Borut Razem <borut.razem AT siol.net>
9121
9122         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
9123           changed type of list parameter to set
9124         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
9125         * src/port.h: changed type of do_assemble() parameter to set
9126         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
9127           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
9128           definition of "cppoutfilename" macro with NULL value in preProcess()
9129         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
9130         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
9131         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
9132           replaced with set *binPathSet
9133         * shash_add() deallocates the item, if allready exsists, before adding the new one
9134         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
9135
9136 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
9137
9138         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
9139           a nested for loop bug in the PIC port
9140         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
9141           for loops
9142
9143 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
9144
9145         * support/Util/dbuf.h: remove C++ stuff to make it portable
9146
9147 2003-03-28  Borut Razem <borut.razem AT siol.net>
9148
9149         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
9150           literal strings in stringLiteral()
9151         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
9152         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
9153           to the project
9154
9155 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
9156
9157         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
9158
9159 2003-03-26    <johan AT balder>
9160
9161         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
9162         * src/ds390/gen.c (saveRegisters): catched symbol abuse
9163         * src/SDCCast.c (decorateType): fixed " -v < 3"
9164
9165 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
9166
9167         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
9168         Added Lenny Story's debug infrastructure changes:
9169         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
9170         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
9171         * src/cdbFile.c: added
9172         * src/SDCCdebug.c: added
9173         * src/SDCCdebug.h: added
9174         * src/SDCCast.c (createFunction)
9175         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
9176         * src/SDCCmain.c (parseCmdLine, main)
9177         * src/SDCCmem.c (redoStackOffsets)
9178         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
9179         * src/SDCCsymt.h
9180         * src/common.h
9181         * src/avr/gen.c (genAVRCode)
9182         * src/ds390/gen.c (gen390Code)
9183         * src/mcs51/gen.c (gen51Code)
9184         * src/pic/gen.c (genpic14Code)
9185         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
9186         * src/xa51/gen.c (genXA51Code)
9187         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
9188
9189 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9190
9191         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
9192         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
9193
9194 2003-03-22    <johan AT balder>
9195
9196         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
9197
9198 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
9199
9200         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
9201         * doc/cdbfileformat.lyx: added, written by Lenny Story
9202         * doc/Makefile: added cdbfileformat.lyx
9203         * doc/clean.mk: added cdbfileformat.lyx
9204
9205 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
9206
9207         * src/mcs51/peeph.def: fix bug #705773
9208
9209 2003-03-20    <johan AT balder>
9210
9211         An sfr/sbit can have an "at #" AND an initializer
9212         * src/SDCCsymt.c (checkSClass):
9213         * src/SDCCmem.c (allocGlobal):
9214         * src/SDCCmem.c (allocLocal):
9215         * src/SDCCast.c (createBlock):
9216
9217 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
9218
9219         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
9220
9221 2003-03-16    <johan AT balder>
9222
9223         Undid the hackup of const and volatile, the problem is much bigger
9224         * src/SDCC.y:1.65
9225         * src/SDCCast.c:1.171
9226         * src/SDCCglue.c:1.138
9227         * src/SDCCicode.c:1.146
9228         * src/SDCCsymt.c:1.150
9229         * src/SDCCval.c:1.65
9230
9231 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
9232
9233         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
9234         * src/ds390/gen.c (genAddrOf): fixed bug #704087
9235
9236 2003-03-13    <johan AT balder>
9237
9238         Hackup const and volatile modifiers in type chains a bit:
9239         * src/SDCC.y:1.63
9240         * src/SDCCast.c:1.169
9241         * src/SDCCglue.c:1.136
9242         * src/SDCCicode.c:1.143
9243         * src/SDCCsymt.c1.146
9244         * src/SDCCsymt.h1.59
9245         * src/SDCCval.c:1.63
9246
9247 2003-03-12    <johan AT balder>
9248
9249         * src/SDCCBBlock.h: more LRH debugging junk
9250         * src/SDCCcflow.h: more LRH debugging junk
9251         * src/SDCCloop.c: more LRH debugging junk
9252         * src/SDCC.y (struct_declaration): fixed bug #697590
9253         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
9254         * src/ds390/gen.c (aopForRemat): fixed bug #700031
9255         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
9256
9257 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9258         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
9259         test function names must now match exactly).
9260         * src/SDCCcse.c: added special case in findCheaperOp to allow
9261         extending a short integer. Makes less awful code for bug 700121 test case.
9262
9263 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9264
9265         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
9266         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
9267
9268 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9269
9270         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
9271         actually called (operandsNotEqual() was called for all
9272         operandsNotEqualX tests).
9273
9274 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
9275
9276         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
9277         with shorter literals. Fixes bug 700121.
9278
9279 2003-03-11    <johan AT balder>
9280
9281         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
9282
9283 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
9284
9285         * src/SDCCloop.c (mergeRegions): an evil beast is dead
9286         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
9287
9288 2003-03-10  Borut Razem <borut.razem AT siol.net>
9289
9290         * src/SDCCmain.c: pipe preprocessor's output
9291         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9292         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9293         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9294         which closes all pipes in pipeSet set
9295         * src/SDCCset.c: free deleted item in function deleteSetItem()
9296         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9297         moved from z80 to src subproject
9298         * .version: increased version number to 2.3.4
9299
9300 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
9301
9302         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
9303         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
9304         * support/regression/ports/xa51/spec.mk: fix typo
9305
9306 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
9307
9308         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
9309
9310 2003-03-09  Borut Razem <borut.razem AT siol.net>
9311
9312         * src/SDCCmain.c: pipe preprocessor's output
9313         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
9314         * sdcc_vc_in.h: define pclose as _pclose for WIN32
9315         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
9316         which closes all pipes in pipeSet set
9317         * src/SDCCset.c: free deleted item in function deleteSetItem()
9318         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
9319         moved from z80 to src subproject
9320
9321 2003-03-09  Borut Razem <borut.razem AT siol.net>
9322
9323         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
9324         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
9325         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
9326         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
9327         * src/SDCCglobl.h: unification of WIN32 native definitions
9328
9329 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9330
9331         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
9332
9333 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9334
9335         * src/configure.in:   check for endianess (even while cross-compiling)
9336         * src/configure:      check for endianess (even while cross-compiling)
9337         * src/configure_in.h: check for endianess (even while cross-compiling)
9338         * src/avr/gen.c:        remove old endianess stuff
9339         * src/mcs51/gen.c:      remove old endianess stuff
9340         * src/ds390/gen.c:      remove old endianess stuff
9341         * src/pic/gen.c:        remove old endianess stuff
9342         * src/pic/genarith.c:   remove old endianess stuff
9343         * src/pic/glue.c:       fix endianess check
9344         * src/pic16/gen.c:      remove old endianess stuff
9345         * src/pic16/genarith.c: remove old endianess stuff
9346         * src/pic16/glue.c:     fix endianess check
9347         * src/xa51/gen.c:       remove old endianess stuff
9348         * src/z80/gen.c:        fix endianess check
9349         * src/SDCCglue.c:       fix endianess check
9350         * src/ds390/peeph.def: fix bug 700036
9351
9352 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
9353
9354         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
9355         * src/configure: find appropriate data-types on host for SDCC's int and long
9356         * src/configure.in: find appropriate data-types on host for SDCC's int and long
9357         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
9358         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
9359
9360 2003-03-07    <johan AT balder>
9361
9362         Just a big NOOP:
9363                 some minor cleanups before the big shot
9364                 OP_DEFS and OP_USES now use Kevin's protection
9365                 new option --nolabelopt
9366
9367         * src/SDCCBBlock.c:
9368         * src/SDCCast.c,:
9369         * src/SDCCcflow.c:
9370         * src/SDCCcse.c:
9371         * src/SDCCicode.c:
9372         * src/SDCCicode.h:
9373         * src/SDCClabel.c:
9374         * src/SDCCloop.c:
9375         * src/SDCCmain.c:
9376         * src/ds390/ralloc.c:
9377         * src/mcs51/ralloc.c:
9378         * src/pic/ralloc.c:
9379         * src/xa51/ralloc.c:
9380         * src/z80/ralloc.c:
9381
9382 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
9383
9384         * src/pic/pcode.c (get_op): fix 64 bit warnings
9385         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
9386         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
9387         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
9388         * support/regression/tests/malloc.c: fix 64 bit warnings
9389
9390 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
9391
9392         * src/mcs51/gen.c (genMinus): fixed bug 696436
9393
9394 2003-03-02  Borut Razem <borut.razem AT siol.net>
9395
9396         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
9397
9398 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
9399
9400         * configure.in: test for mkstemp
9401         * sdccconf_in.h: add HAVE_MKSTEMP
9402
9403 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
9404
9405         * device/include/ctype.h: removed warning while using --stack-auto
9406         * device/include/malloc.h: removed warning while using --stack-auto
9407         * device/include/string.h: removed warning while using --stack-auto
9408
9409 2003-02-23  Borut Razem <borut.razem AT siol.net>
9410
9411         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
9412         because NDEBUG is defined (see man assert)
9413         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
9414
9415 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9416
9417         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
9418         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
9419
9420 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
9421
9422         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
9423         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
9424
9425 2003-02-18    <johan AT balder>
9426
9427         * as/mcs51/asmain.c (asmbl): module can start with a digit
9428         * as/z80/asmain.c (asmbl): module can start with a digit
9429
9430 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
9431
9432         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
9433         * src/asm.c: fix pipe() for Mingw32
9434
9435 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
9436
9437         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
9438         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
9439         make -V work again; --c1mode reads now from stdin
9440         * doc/sdccman.lyx: added --c1mode
9441         * support/Util/SDCCerr.c: new messages for c1 mode
9442         * support/Util/SDCCerr.h: new messages for c1 mode
9443         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
9444
9445 2003-02-15    <johan AT balder>
9446
9447         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
9448
9449 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
9450
9451         * doc/sdccman.lyx: Environment variables, -o and other minor things
9452
9453 2003-02-14    <johan AT balder>
9454
9455         * src/xa51/main.c: before anyone really tries to use it :)
9456
9457         * Install doc's in share/sdcc/doc
9458         * removed some obsolete files
9459         * Do a proper make distclean and uninstall
9460         M Makefile.common.in
9461         R sdccbuild.sh
9462         M as/Makefile
9463         M device/include/Makefile.in
9464         M device/lib/Makefile.in
9465         M doc/sdccman.lyx
9466         M link/Makefile
9467         M sim/ucsim/doc/Makefile.in
9468         M src/clean.mk
9469         R src/avr/peeph.rul
9470         R src/xa51/peeph.rul
9471         M support/cpp2/Makefile.in
9472         M support/makebin/Makefile
9473
9474
9475 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
9476
9477         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
9478
9479 2003-02-10  Borut Razem <borut.razem AT siol.net>
9480
9481         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
9482         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
9483         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
9484         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
9485         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
9486         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
9487         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
9488         src/z80/Makefile.bcc: Borland Makefile cleanup
9489         * as/z80/Makefile.bcc: Added Borland Makefile
9490         * support/cpp2/borland.h: Removed
9491
9492 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
9493
9494         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
9495         * src/SDCC.lex: new pragma NOIV
9496         * src/SDCCglobl.h: new pragma NOIV
9497         * src/SDCCmem.c: new pragma NOIV
9498
9499 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9500
9501         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
9502
9503 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
9504
9505         * src/SDCCmain.c: signal handling is switched off by --debug
9506         * doc/Makefile: small fix for install; use clean.mk again
9507         * doc/clean.mk: clean *.pdf and *.html too
9508
9509 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
9510
9511         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
9512         * device/lib/printfl.c: fix a ds390 bug by making it portable
9513         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
9514         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
9515         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
9516         * debugger/mcs51/cmd.c: converted multi-line string literals
9517         * sim/ucsim/globals.cc: converted multi-line string literals
9518         * src/SDCCmain.c: introduced signal handler to remove temp files
9519         * doc/Makefile: small tweaks, implement clean
9520         * doc: removed generated files
9521
9522 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9523
9524         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
9525         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
9526         Address Record is not correctly generated for DS390."
9527
9528 2003-02-02  Borut Razem <borut.razem AT siol.net>
9529
9530         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
9531         * as/mcs51/asm.h: fixed compilation with Borland C
9532         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
9533         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
9534         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
9535         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
9536         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
9537         src/z80/Makefile.bcc: delete $(LIB) only if exist
9538         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
9539
9540 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
9541
9542         * device/include/malloc.h: introduced NULL
9543         * device/include/string.h: introduced NULL
9544         * device/include/stdlib.h: introduced NULL
9545         * device/lib/_memcpy.c: removed NULL
9546         * device/lib/_strcat.c: removed NULL
9547         * device/lib/_strchr.c: removed NULL
9548         * device/lib/_strcmp.c: removed NULL
9549         * device/lib/_strcpy.c: removed NULL
9550         * device/lib/_strcspn.c: removed NULL
9551         * device/lib/_strlen.c: removed NULL
9552         * device/lib/_strncat.c: removed NULL
9553         * device/lib/_strncmp.c: removed NULL
9554         * device/lib/_strncpy.c: removed NULL
9555         * device/lib/_strpbrk.c: removed NULL
9556         * device/lib/_strrchr.c: removed NULL
9557         * device/lib/_strspn.c: removed NULL
9558         * device/lib/_strstr.c: removed NULL
9559         * device/lib/_strtok.c: removed NULL
9560         * device/lib/malloc.c: removed NULL, include own header
9561
9562 2003-02-02    <johan AT balder>
9563
9564         * 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
9565         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
9566         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
9567         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
9568         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
9569         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
9570
9571 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9572
9573         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
9574         area 'DATA'"
9575
9576 2003-02-01    <johan AT balder>
9577
9578         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
9579
9580 2003-01-31    <johan AT CP255758-A>
9581
9582         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
9583
9584 2003-01-30    <johan AT balder>
9585
9586         * src/SDCCBBlock.c: automatic bug detection
9587         * src/SDCCicode.c: automatic bug detection
9588
9589 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9590
9591         * src/SDCCglobl.h:   now --xram-size 0 works
9592         * src/SDCCmain.c:    now --xram-size 0 works
9593
9594 2003-01-29    <johan AT balder>
9595
9596         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
9597
9598 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9599
9600         * as/mcs51/aslink.h: Added options --xram-size and --code-size
9601         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
9602         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
9603         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
9604         * src/SDCCglobl.h:   Added options --xram-size and --code-size
9605         * src/SDCCmain.c:    Added options --xram-size and --code-size
9606
9607 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
9608
9609         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
9610         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
9611
9612 2003-01-27    <johan AT balder>
9613
9614         * src/SDCC.y: fixed bug #613764
9615
9616 2003-01-26    <johan AT balder>
9617
9618         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
9619         * src/SDCCsymt.h: fixed bug #673374
9620         * src/SDCCglue.c: fixed bug #661910
9621         * src/SDCCast.c: fixed bug #458099 and 673374
9622
9623 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
9624
9625         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
9626         * as/mcs51/strcmpi.h: added
9627         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
9628         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
9629         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
9630         * as/mcs51/assym.c: strcmpi -> as_strcmpi
9631         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
9632         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
9633         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
9634         * as/mcs51/Makefile.aslink: new module strcmpi
9635         * as/mcs51/Makefile.asx8051: new module strcmpi
9636         * as/mcs51/Makefil.bcc: new module strcmpi
9637         * as/mcs51/Makefile.in: new module strcmpi
9638         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
9639
9640 2003-01-26    <johan AT balder>
9641
9642         * src/SDCCglue.c: reverted back to 1.124
9643         * src/SDCCast.c: reverted back to 1.156
9644         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
9645
9646 2003-01-25    <johan AT balder>
9647
9648         * src/SDCCglue.c: A better fix for bug #661910
9649         * src/SDCCast.c: A better fix for bug #661910
9650         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
9651
9652 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9653
9654         * src/Makefile.in: remove spawn.o
9655         * src/SDCCmain.c: remove spawn.h
9656         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
9657         * src/spawn.c: removed
9658         * src/spawn.h: removed
9659         * support/regression/ports/ds390/spec.mk: link with -r
9660
9661 2003-01-24    <johan AT CP255758-A>
9662
9663         * src/ds390/gen.c (aopOp): fixed bug #667458
9664         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
9665         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
9666         (createIvalCharPtr): an ival doesn't always have a storage class anymore
9667
9668 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
9669
9670         * src/mcs51/peeph.def: better assembler identation by Frieder
9671         * src/mcs51/gen.c: better assembler identation by Frieder
9672
9673 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
9674
9675         * as/z80/string.h: removed for gcc 3.2
9676         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
9677         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
9678
9679 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9680
9681         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
9682         * src/SDCCpeeph.c (replaceRule): fix bug #663503
9683         * support/regression/Makefile: separate temp files for ports
9684         * support/regression/generate-cases.py: separate temp files for ports
9685         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9686         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
9687
9688 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
9689
9690         * moved tinitalk to device/examples/ds390
9691
9692 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
9693
9694         * as/mcs51/lkmem.c: rflag is for DS390
9695         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
9696         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
9697                          (linkEdit): move mem- and map-files the same way as ihx-files
9698         * src/z80/main.c (_setDefaultOptions): removed --generic
9699         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
9700         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
9701         * src/pic/glue.c (picglue): --c1mode works again
9702         * src/pic16/glue.c (pic16glue): --c1mode works again
9703         * src/asm.c (printCLine): fix #660034
9704
9705 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
9706
9707         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
9708         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
9709         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
9710         * as/mcs51/lkmem (summary): better fix for sp problem
9711         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
9712         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
9713         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
9714                                               remove --stack-after-data
9715
9716 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
9717
9718         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
9719         * src/SDCCutil.c (join): ugly bug: missing '\0'
9720         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
9721
9722 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9723
9724         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
9725         * src/port.h: typo
9726         * src/pic/main.c (_asmCmd): gpasm supports -o
9727         * src/z80/main.c: more general macros
9728         * device/lib/Makefile.in: remove intermediate files
9729
9730 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
9731
9732         * .version: Bumped version number to 2.3.3
9733         * src/SDCCBBlock.c: new option -o
9734         * src/SDCCglobl.h: new option -o
9735         * src/SDCCglue.c: new option -o
9736         * src/SDCCmain.c: new option -o
9737         * src/asm.c: new option -o
9738         * src/ds390/main.c: new option -o
9739         * src/pic/glue.c: new option -o
9740         * src/pic/pcode.c: new option -o
9741         * src/pic/ralloc.c: new option -o
9742         * src/pic16/glue.c: new option -o
9743         * src/pic16/pcode.c: new option -o
9744         * src/pic16/ralloc.c: new option -o
9745         * src/z80/main.c: new option -o
9746         * device/lib/Makefile.in: use -o
9747         * support/regression/ports/ds390/spec.mk: use -o
9748         * support/regression/ports/gbz80/spec.mk: use -o
9749         * support/regression/ports/mcs51/spec.mk: use -o
9750         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
9751         * support/regression/ports/z80/spec.mk: use -o
9752         * support/regression/ports/ucz80/spec.mk: use -o
9753         * support/regression/ports/xa51/spec.mk: use -o
9754         * support/regression/fwk/lib/timeout.c: fix usage string
9755
9756 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
9757         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
9758
9759 2003-01-07    <johan AT balder>
9760
9761         * src/SDCCast.c (decorateType): fixed bug #600035
9762
9763 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
9764         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
9765         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
9766         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
9767         * src/pic/pcode.c: outcommented unused variable to remove warnings
9768         * src/pic/ralloc.c: outcommented unused variable to remove warnings
9769
9770 2003-01-06    <karl AT turbobit.com>
9771         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
9772    regression tests.
9773
9774 2003-01-06    <johan AT balder>
9775
9776         * src/SDCCicode.c: fixed array add
9777
9778 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
9779         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
9780         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
9781
9782 2003-01-04    <johan AT balder>
9783
9784         * src/SDCCval.c (getNelements): fixed the initialized array of structures
9785
9786 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9787         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
9788
9789 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9790         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
9791         * support/regression/tests/bug-524697.c: fit mem usage into 8032
9792
9793 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
9794         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
9795
9796 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
9797         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
9798
9799 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
9800         * src/mcs51/main.c: removed {bindir}{sep} from aslink
9801
9802 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9803
9804     * in \sdcc\as\mcs51\ changed these files in order to create an
9805     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
9806     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
9807     following files to include the previous two files: aslink.dsp,
9808     Makefile.aslink, Makefile.bcc, and Makefile.in.
9809
9810     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
9811     .adb instead of .cdb
9812
9813 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9814
9815         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
9816         value from option --iram-size.
9817
9818 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9819
9820         * \sdcc\as\mcs51\lklist.c: added boundary check before using
9821         dram[] array.
9822
9823 2002-09-18    <wiml AT hhhh.org>
9824
9825         * SDCClrange.h: exposed setFromRange() and setToRange()
9826         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
9827           packRegsForAccUse() (bug 542397)
9828         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
9829           multiple times and emitting the fetch operations more than once
9830           added aopGetUsesAcc() function to allow binary operators to
9831           fetch their operands in the correct order; made genMinus() emit
9832           compact code for X = LITERAL - Y
9833
9834 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9835         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
9836         sprintf() in line 1267.
9837
9838 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9839         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
9840         like ports.
9841
9842 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
9843         Changes to aslink (All the changes are marked with 'JCF'):
9844
9845         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
9846         summary().
9847
9848         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
9849         area BSEG.  Also moves, if possible, the DATA area down into the internal
9850         ram so more space is available.
9851
9852         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
9853         sflag.
9854
9855         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
9856         not bytes.  Function summary() which creates a memory usage summary
9857         file with extension .mem.  Reports of overlaping stack and small stack
9858         size.  If the space for the stack is less than 16 bytes aslink trows a
9859         warning.
9860
9861         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
9862         the 8051.  Option 'y' for memory summary output file.
9863
9864         Changes to sdcc (All the changes are marked with 'JCF'):
9865
9866         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
9867
9868         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
9869         overlaying area for it (uses RegBankUsed[4]).
9870
9871         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
9872         bank zero as used by default.  By default aslink locates the stack
9873         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
9874         the creation of the .mem file.  Delegates the allocation of data area
9875         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
9876         the begining of the stack area to aslink.
9877
9878         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
9879         glue() in SDCCglue.c creates an area for it.
9880
9881 2002-09-03  Borut Razem <borut.razem AT siol.net>
9882         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
9883         sdcc/src/pic/glue.c:
9884         introduced atexit() handler for teporay files removal in case of
9885         errors, assertions, ...
9886
9887 2002-08-29  Borut Razem <borut.razem AT siol.net>
9888         * sdcc/support/cpp2/auto-host_vc_in.h:
9889         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
9890         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
9891         Maybe there is a similar problem with BORLANDC? It should be checked!
9892
9893         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
9894         corrected improper use of assert: the assignment to clr variable was done inside the assert.
9895         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
9896         was not executed, and the compiler (cl) launched a warning:
9897         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
9898
9899 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
9900         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
9901
9902 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
9903         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
9904
9905         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9906           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
9907           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
9908           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9909           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
9910           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
9911           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
9912         - added Release configuration in VS projects
9913         - review of compiler an linker options
9914         - VC .exe files are generated in bin_vc directory, not to interfere
9915           with binaries generated from other projects (cygwin, mingw, bcc ...)
9916
9917         * sdcc/src/yacc.dsp: added
9918
9919         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
9920         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
9921         and insert the version number definitions from .version
9922
9923         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
9924
9925         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
9926         added - genarate auto-host.h using auto-host_vc_in.h as template
9927
9928         * sdcc/sdcc_vc.h,
9929         removed from CVS, generated automatically
9930
9931 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
9932         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
9933
9934 2002-08-11  Borut Razem <borut.razem AT siol.net>
9935         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
9936
9937 2002-08-10  Borut Razem <borut.razem AT siol.net>
9938         * src/SDCCmain.c (main):
9939         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
9940         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
9941         The consequence was that some temporary files were not removed.
9942
9943         * src/SDCCglue.c:
9944         unification of code in functions tempfilename() and tempfile():
9945         function tempnam() is defined in Visual Studio 6.0 and .NET
9946
9947         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
9948
9949         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
9950           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
9951         - removed compiler command line option /WX: Treats all warnings as errors
9952         - update a list of source files, included into the project
9953
9954         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
9955           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
9956         changed project type to Generic Project so that can be correcly converted to VS.NET project
9957
9958         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
9959
9960         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
9961
9962         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
9963
9964         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
9965         added return 0 statements after assert() to make compiler happy
9966
9967         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
9968         added newline in the def file to keep MSC compiler satisfied
9969
9970         * sdcc/src/z80/gen.c:
9971         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
9972           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
9973         - solved MSC error in function aopDump()
9974
9975         * sdcc_vc.h: define PREFIX as "\\sdcc"
9976
9977 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
9978         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
9979
9980 2002-06-22  Scott Dattalo <scott AT dattalo.com>
9981         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
9982         - Rewrote the register banking algorithm.
9983         - Added pCode live-range analysis to registers (for now, only non-used and
9984         singly-used registers optimized away)
9985
9986         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
9987
9988         * 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.
9989
9990 2002-05-10  Scott Dattalo <scott AT dattalo.com>
9991         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
9992
9993 2002-04-22  Michael Hope  <michaelh AT vroom>
9994
9995         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
9996
9997         * configure.in (DD_COPT): Added include support required for gbdk.
9998
9999         * .version: Bumped version number just to increase it.
10000
10001         * src/SDCCmain.c: Added -nostdinc to the default options.
10002
10003 2002-04-15  Michael Hope  <michaelh AT vroom>
10004
10005         * device/lib/z80/printf.c (sprintf): Added.
10006
10007         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
10008
10009         * src/z80/peeph.def: Added transpose redundent load rule.
10010
10011         * src/z80/main.c: Added force callee saves for jaune.
10012
10013         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
10014
10015         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
10016
10017 2002-03-28  Johan Knol  <johan AT balder>
10018
10019         * src/SDCCval.c: fixed bug #532436
10020
10021 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10022         * /src/port.h:
10023         Added "char *Processor" field to the port structure.
10024
10025         * /src/SDCCmain.c:
10026         Added -p option. Allows port dependent processor to be specified.
10027
10028         * all ports:
10029         Initialized the new field char *Processor field to NULL in all ports
10030
10031         * /src/pic/*:
10032         Compiler generated registers for interrupt context saving
10033         were not getting allocated.
10034
10035 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
10036
10037         * /src/SDCCast.c:
10038         Fixed left shift. Will promote the left side of a left shift
10039         if a) left shifting more than size of operand or b) when assigned
10040         to something size > size of left side
10041
10042 2002-03-14  Scott Dattalo <scott AT dattalo.com>
10043         * src/pic/*
10044         tons of changes. Register allocation has been
10045         rewritten. Added customization for the various PICs. Flow
10046         analysis is restructured. ...
10047
10048         * src/pic/device.h:
10049         Added
10050
10051         * src/pic/device.c:
10052         Added. device.c is a PIC port hack to accomodate variations
10053         in PIC devices.
10054
10055 2002-03-13  Michael Hope  <michaelh AT vroom>
10056
10057         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
10058
10059 2002-03-04  johanknol  <johanknol AT manik>
10060
10061         * /src/SDCCval.c: fixed
10062
10063         const unsigned char arr[][2] = { { 0, 1 } };
10064         t18.c:1: error: Initializer element is not constant
10065
10066 2002-03-04  bela  <bela AT manik>
10067
10068         * /device/include/mcs51reg.h:
10069         ds89c420 register definition update
10070
10071 2002-03-03    <johan AT FRIJA>
10072
10073         * support/Util/SDCCerr.c: did something, but don't no why anymore
10074
10075         * support/regression/tests/bug-524691.c: made it a little less shy
10076
10077         * src/SDCCast.c (decorateType): fixed bug #524697
10078
10079         * src/SDCCast.c: made some lineno improvements
10080
10081         * src/SDCCval.c (getNelements): changed warning to error
10082
10083         * src/SDCCglue.c (printIvalArray): changed warning to error
10084
10085         * src/SDCCicode.c: fixed a warning for mingw
10086
10087         * src/SDCCast.c (decorateType): fixed the << promotion for ops
10088
10089         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
10090
10091 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
10092
10093         * src/ds390/peeph.def:
10094         Added some more peephole rules
10095
10096         * src/ds390/gen.c: Various fixes & enhancements
10097
10098         * src/SDCClrange.c, src/SDCClrange.h:
10099         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
10100
10101         * src/ds390/ralloc.c:
10102         various fixes & enhancements (ds390) specific
10103
10104         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
10105         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
10106         from rallocs.
10107
10108         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
10109
10110 2002-03-02    <johan AT FRIJA>
10111
10112         * src/SDCCast.c (decorateType): fixed bug #524708
10113
10114         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
10115
10116         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
10117
10118 2002-03-01  Michael Hope  <michaelh AT vroom>
10119
10120         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
10121
10122         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
10123
10124 2002-03-01    <johan AT FRIJA>
10125
10126         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
10127
10128         * src/SDCCast.c (decorateType): fixed bug #524209
10129
10130         * src/SDCCval.c (valNot): fixed bug #524195
10131
10132 2002-02-26    <johan AT balder>
10133
10134         * src/xa51/gen.c: fixed a warning
10135
10136         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
10137
10138         * src/SDCCast.c (decorateType): fixed bug #522534
10139
10140 2002-02-23    <johan AT balder>
10141
10142         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
10143
10144 2002-02-22    <johan AT balder>
10145
10146         * src/SDCCast.c: fixed bug #514865
10147
10148         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
10149
10150 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
10151
10152         * sdcc/src/SDCCloop.c:
10153         Previous fix was not good. basic blocks that have "break" or "return" are
10154         not really partof a loop , but live ranges used in these blocks should
10155         be live thru the entire loop, so set partOfLoop but don't add them to
10156         loop region
10157
10158 2002-02-21    <johan AT FRIJA>
10159
10160         * src/SDCCcse.c: fixed bug #514308
10161
10162 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
10163
10164         * src/SDCCloop.c:
10165         Fixed BUG #519583. If a conditional block ended in a return/break
10166         statement inside a loop, it was not being considered part of the loop.
10167
10168         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
10169
10170 2002-02-10  Karl Bongers <karl AT turbobit.com>
10171
10172         * debugger/*:
10173         Fixed up SDCDB debugger somewhat.  Updated debugger/README
10174         with lots of comments and notes.
10175
10176         * device/examples/test2.c:
10177         Fix bug, "red" variable not being initialized(compiler complained).
10178
10179         * device/examples/Makefile, examples/test3.c:
10180         Add Makefile in device/examples folder, compiles test3.c
10181         for use as a multiple module SDCDB test case.
10182
10183         * sim/ucsim/cmd.src/cmdset.cc:
10184         Took out debug printfs in ucsim "next" command.
10185
10186         * sim/ucsim/xa.src:
10187         Karl and Johan start ucsim XA support.  Most dissassembly working,
10188         about 75% emulation done(plenty of work remaining).
10189
10190         * sim/ucsim/z80.src:
10191         Add Z80 support to ucsim, add test-ucz80 regression test,
10192         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
10193         Notice z80 compiler fails on examples/test3.c/crc code.
10194
10195 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
10196
10197         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
10198         Added support for --parms-in-bank1
10199
10200         * src/ds390/peeph.def:
10201         added a few more peephole optimzations
10202
10203         * src/ds390/main.c:
10204         1) added __builtin_inp & __builtin_outp used to read in data of given length
10205            from a memory mapped port
10206         2) added __builtin_memcmp
10207         3) added __builtin_swapw swap bytes of a short
10208
10209         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
10210         1) handle multiple send & receives from register bank1
10211         2) ralloc can now allocate DPTR1 to some liveRanges
10212
10213         * src/SDCCsymt.c, src/SDCCsymt.h:
10214         changes to handle multiple sends & receives
10215
10216         * src/SDCCptropt.h:
10217         added some pointer arithmetic optimization
10218
10219         * src/SDCCptropt.c:
10220         added some pointer arithmetic optimizations but not stable yet so not
10221         called from anywhere (will get this working shortly)
10222
10223         * src/SDCCopt.c: fixed for multiple sends & receives
10224
10225         * src/SDCCmain.c:
10226         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
10227         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
10228            set preprocessor defines (depending on options)
10229
10230         * src/SDCCicode.c, src/SDCCicode.h:
10231         changes made to handle multiple sends & receives
10232
10233         * src/SDCCglobl.h:
10234         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
10235
10236         * src/SDCCcse.c, src/SDCCcse.h:
10237         added function findbackward def (to be used in upcoming optimization)
10238
10239         * src/SDCCcflow.c, src/SDCCcflow.h:
10240         added function returnAtEnd - to determine if a basic block terminates with
10241         a RETURN iCode
10242
10243         * src/SDCCast.c, src/SDCCast.h:
10244         added option parms-in-bank1
10245
10246         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
10247         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
10248         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
10249         adjusted for --parms-in-bank1 option
10250
10251         * device/include/string.h:
10252         donot redefine "reentrant" keyword
10253
10254         * device/include/ds80c390.h: Added some more SFRs
10255
10256 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
10257
10258         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
10259
10260 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
10261
10262         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
10263
10264 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
10265
10266         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
10267
10268 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
10269
10270         * Added --xram-movc option
10271
10272 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
10273
10274         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
10275
10276 2002-01-11  Johan Knol
10277
10278         * Added math lib of Jesus Calvino-Fraga
10279
10280 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
10281
10282         * src/SDCCmain.c (processFile): fix processing of ../../src.c
10283         * support/regression/Makefile: new target test-mcs51-stack-auto
10284         * support/regression/ports/mcs51-stack-auto/spec.mk: added
10285
10286 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10287
10288         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
10289
10290 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
10291
10292         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
10293
10294 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
10295
10296         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
10297
10298         * src/SDCCglue.h: add definition for printIvalChar()
10299
10300 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10301
10302         * src/SDCCast.c: fix #498138 by Johan
10303
10304         * src/SDCCglue.c: fix #498138 by Johan
10305
10306 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
10307
10308         * support/regression/Makefile: fix clean
10309
10310         * support/regression/ports/ds390/support.c: fix transmission of last character
10311
10312 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
10313
10314         * /sdcc/src/ds390/gen.c:
10315         a) improved computing address of stack variable
10316         b) took out some #if 0 code
10317         c) improved parmBytes adjustment
10318         d) improved genPlusIncr & genMinusIncr
10319         e) genCmp could generate bad code (when left assigned to DPTR)
10320         f) Fixed bug in hasInc
10321
10322         * /sdcc/src/ds390/ralloc.c:
10323         a) packRegsForSupport could mess up live information (Fixed)
10324         b) packRegsDPTRuse could be incorrect for left & right shift
10325
10326         * /sdcc/src/mcs51/ralloc.c:
10327         packRegsForSupport could mess up the live information (Fixed)
10328
10329         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
10330
10331         * /sdcc/src/SDCCast.c:
10332         can reverse a loop even if function call is present as long
10333         as the loop control variable is local & is not passed as parameter
10334
10335 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10336
10337         * /sdcc/ChangeLog: *** empty log message ***
10338
10339         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
10340         More builtin function additions for TININative
10341
10342         * /sdcc/src/ds390/ralloc.c:
10343         Had broken the regression testsuite
10344
10345         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
10346
10347         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
10348         Added funcattr hasStackParms will be set for reentrant functions when there
10349         are paramteres on the stack, this helps in minimizing frame pointer generation
10350         typeFromStr can handle function pointers now
10351
10352         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
10353         *** empty log message ***
10354
10355 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10356
10357         * /src/ds390/gen.c, /src/ds390/main.c:
10358         More builtin function additions for TININative
10359
10360         * /src/ds390/ralloc.c:
10361         Had broken the regression testsuite
10362
10363         * /src/SDCCast.c: Fixed a bug in dumptree
10364
10365         * /src/SDCCsymt.c, /src/SDCCsymt.h:
10366         Added funcattr hasStackParms will be set for reentrant functions when there
10367         are paramteres on the stack, this helps in minimizing frame pointer generation
10368         typeFromStr can handle function pointers now
10369
10370         * /doc/builtins.txt, /doc/TININative.txt:
10371         *** empty log message ***
10372
10373
10374 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
10375
10376         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
10377         ALPHA version for -mTININative
10378
10379         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
10380         updated to reflect changes in the port structure
10381
10382         * /src/port.h:
10383         added function do_assemble (similar to do_link) if non-null this function
10384         will be called to do assembly (-mTININative) requires a multi command
10385         assembly
10386         added function genAssemblerEnd will be called to generate assembler Epilogue
10387
10388         * /src/SDCCsymt.c:
10389         added _JavaNative to debug info printing
10390
10391         * /src/SDCCmain.c: added option --tini-libid
10392         added port->do_assemble function (-mTININative) has a multi command assemble
10393
10394         * /src/SDCCglue.c: Disabled "constExpr" check
10395         added port->genAssemblerEnd function
10396
10397         * /src/SDCCglobl.h: Added option --tini-libid value
10398
10399         * /src/SDCCast.h:
10400         tookout optimizeCompare from the header (has no external references)
10401
10402         * /src/SDCCast.c: made one more function "static"
10403
10404 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
10405
10406         * src/z80/mappings.i: Added z80asm support.
10407
10408         * src/z80/main.c: Added z80asm support on --asm=z80asm
10409
10410         * src/z80/gen.c: Fixed asm portability issues.
10411
10412         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
10413
10414         * src/SDCCglue.c (printExterns): Added global/extern split.
10415
10416 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
10417
10418         * support/regression/Makefile: added test for mcs51 model large
10419
10420         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
10421
10422         * support/regression/ports/gbz80/spec.mk: added -mgbz80
10423
10424 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
10425
10426         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
10427
10428 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
10429
10430         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
10431
10432         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
10433
10434 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
10435
10436         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
10437
10438         * support/regression/tests/simplefloat.c: Port to mcs51.
10439
10440 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
10441         * support/regression/tests/bug-485362.c: Added.
10442
10443         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
10444
10445         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
10446
10447         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
10448
10449         * src/z80/gen.c (aopDump): Added a dump function.
10450
10451 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
10452         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
10453
10454         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
10455
10456         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
10457
10458         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
10459
10460         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
10461
10462         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
10463
10464         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
10465
10466         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
10467
10468         * support/regression/ports/ds390/support.c: Use tinibios.
10469
10470         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
10471
10472 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
10473
10474         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
10475         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
10476
10477         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
10478
10479         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
10480
10481 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
10482
10483         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
10484
10485         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
10486         (packRegsForIYUse): Created and optimised.
10487
10488 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10489
10490         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
10491 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
10492
10493         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
10494
10495         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
10496
10497         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
10498
10499 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10500
10501         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
10502
10503         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
10504
10505 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10506
10507         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
10508
10509         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
10510
10511         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
10512
10513 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
10514
10515         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
10516         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
10517         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
10518
10519         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
10520
10521         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
10522         (genNotFloat): Added.
10523         (genUminusFloat): Added.
10524
10525         * device/lib/z80/Makefile: Added floating pt stubs.
10526
10527         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
10528
10529         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
10530
10531         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
10532
10533 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
10534
10535         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
10536
10537         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
10538
10539         * sdcc/support/regression/Makefile: Add port ds390.
10540
10541         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
10542
10543         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
10544
10545         * sdcc/support/regression/ports/ds390/spec.mk: Added.
10546
10547         * sdcc/support/regression/ports/ds390/support.c: Added.
10548
10549         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
10550
10551         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
10552
10553         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
10554
10555 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10556
10557         * device/include/malloc.h: Added z80 and gbz80 support.
10558
10559         * device/lib/gbz80/heap.s: Added.
10560
10561         * device/lib/z80/heap.s: Added.
10562
10563         * device/lib/malloc.c: Added z80 and gbz80 support.
10564
10565         * support/regression/tests/malloc.c (testMalloc): Added.
10566
10567         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
10568
10569         * support/regression/tests/bug-478094.c: Added.
10570
10571         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
10572
10573 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
10574
10575         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
10576
10577         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
10578
10579         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
10580
10581         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
10582
10583         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
10584
10585 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
10586
10587         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
10588
10589 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
10590
10591         * support/regression/tests/bug-477927.c: Added.
10592
10593         * src/z80/peeph.def: Added minor rules.
10594
10595         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
10596
10597         * src/z80/peeph.def: Added jump optimisation modification.
10598
10599 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
10600
10601         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
10602
10603 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
10604
10605         * support/regression/tests/funptrs.c: Added.
10606
10607 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
10608
10609         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
10610
10611 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
10612
10613         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
10614
10615         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
10616
10617         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
10618         (movLeft2ResultLong): Created.
10619
10620         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
10621         (joinPushes): Added.  Joins two char pushes into a word push.
10622
10623 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
10624
10625         * support/cpp2/Makefile.in (install): Added creation of dest dir.
10626
10627         * support/makebin/Makefile (install): Added creation of dest dir.
10628
10629 2001-10-24 Karl Bongers <karl AT turbobit.com>
10630
10631         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
10632
10633 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
10634
10635         * src/z80/ralloc.c: Turned off faulty pack for one use.
10636
10637         * src/z80/peeph-gbz80.def: Removed redundent restart options.
10638
10639         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
10640
10641 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
10642
10643         * support/regression/Makefile: Improved clean
10644
10645         * support/regression/ports/gbz80/spec.mk: Added clean
10646
10647         * support/regression/ports/host/spec.mk: Added clean
10648
10649         * support/regression/ports/z80/spec.mk: Added clean
10650
10651         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
10652
10653         * support/regression/ports/mcs51/timeout.c: little improvements
10654
10655 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
10656
10657         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
10658
10659         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
10660
10661         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
10662
10663 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
10664
10665         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
10666
10667         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
10668
10669 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
10670         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
10671
10672         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
10673
10674         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
10675
10676         * src/mcs51/main.c (_linkCmd): Added bin path to command.
10677
10678         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
10679
10680         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
10681
10682         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
10683
10684         * support/regression/tests/longor.c: Added.
10685
10686 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
10687
10688         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
10689
10690         * as/mcs51/aslink.h: define PATH_MAX
10691
10692         * as/mcs51/asm.h: define PATH_MAX
10693
10694         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
10695
10696         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
10697
10698         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
10699
10700         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
10701
10702         * src/SDCCglobl.h: define PATH_MAX
10703
10704         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
10705
10706         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
10707
10708 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
10709
10710         * src/z80/gen.c (gencjneshort): Fixed
10711
10712         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
10713
10714 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
10715
10716         * support/regression/tests/bug-469671.c: Added.
10717
10718         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
10719
10720 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
10721
10722         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
10723
10724         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
10725
10726 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
10727
10728         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
10729
10730         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
10731
10732         * src/device/lib/_mullong.c : removed hint: nooverlay bug
10733
10734         * src/device/lib/_divuint.c : removed hint: nooverlay bug
10735
10736         * src/device/lib/_divulong.c: removed hint: nooverlay bug
10737
10738         * src/device/lib/_moduint.c : removed hint: nooverlay bug
10739
10740         * src/device/lib/_modulong.c: removed hint: nooverlay bug
10741
10742 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
10743
10744         * 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.
10745
10746         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
10747
10748         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
10749
10750 2001-10-07    <johan AT FRIJA>
10751
10752         * device/lib/gets.c (gets): fixed the return value.
10753
10754 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
10755         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
10756
10757         * 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.
10758
10759         * 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.
10760
10761         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
10762
10763         * src/pic/gen.c: Removed Safe_strdup.
10764
10765         * configure.in: Added option to enable libgc support.
10766
10767         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
10768         (bitVectUnion): Optimised.
10769         (bitVectIntersect): Optimised.
10770         (bitVectBitsInCommon): Optimised.
10771         (bitVectCplAnd): Optimised.
10772
10773         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
10774
10775 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10776
10777         * src/SDCCmain.c: distinguish between assembler debug and plain options
10778
10779         * src/avr/main.c:   remove standard assembler options
10780
10781         * src/ds390/main.c: remove standard assembler options
10782
10783         * src/mcs51/main.c: remove standard assembler options
10784
10785         * src/port.h: removed "PENDING" comment
10786
10787 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10788
10789         * src/device/lib/_mulint.c  : new, with assember functions
10790
10791         * src/device/lib/_mullong.c : new, with assember functions
10792
10793         * src/device/lib/_divuint.c : with assember functions
10794
10795         * src/device/lib/_divsint.c : with assember functions
10796
10797         * src/device/lib/_divulong.c: with assember functions
10798
10799         * src/device/lib/_divslong.c: with assember functions
10800
10801         * src/device/lib/_moduint.c : with assember functions
10802
10803         * src/device/lib/_modsint.c : with assember functions
10804
10805         * src/device/lib/_modulong.c: with assember functions
10806
10807         * src/device/lib/_modslong.c: with assember functions
10808
10809         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
10810
10811         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
10812
10813         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
10814                                       replaced _mululong.c and _mulslong.c by _mullong.c
10815
10816 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
10817
10818         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
10819
10820 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10821
10822         * src/SDCCglue.c: test, if win32api is available for MINGW
10823
10824 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
10825
10826         * src/SDCCsymt.c: no more _modifier in printTypeChain()
10827         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
10828         * support/regression/ports/gbz80/spec.mk: removed GENERIC
10829         * support/regression/ports/host/spec.mk: removed GENERIC
10830         * support/regression/ports/mcs51/spec.mk: removed GENERIC
10831         * support/regression/ports/z80/spec.mk: removed GENERIC
10832
10833 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
10834
10835         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
10836
10837         * support/regression/tests/bug-467035.c: Created.
10838
10839 2001-10-01    <johan AT FRIJA>
10840
10841         * src/SDCC.y: fixed bug #466586 part 1
10842
10843 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
10844
10845         * SDCCicode.c: z80 has no generic pointers
10846         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
10847
10848 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
10849
10850         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
10851
10852 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
10853
10854         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
10855
10856         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
10857
10858 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
10859
10860         * configure.in: Fixed up so that ucsim is only configured once.
10861
10862         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
10863
10864         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
10865         (getPathDifference): As above.
10866
10867         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
10868
10869         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
10870
10871 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
10872         * .version: Updated to 2.3.1
10873
10874         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
10875         Added copyright header.
10876
10877         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
10878         (assemble): Added support for macro based assembler commands.
10879         (linkEdit): Added support for macro based linker commands.
10880         (preProcess): Changed the pre-processor to use macros.
10881         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
10882         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
10883
10884         * device/lib/z80/crt0.s: Added module name for debugging.
10885
10886 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
10887
10888         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10889
10890         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
10891
10892         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
10893
10894         * src/Makefile.in: Added SDCCmacro and SDCCutil
10895
10896 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
10897
10898         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
10899
10900 2001-09-16    <johan AT FRIJA>
10901
10902         * 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.
10903
10904 2001-09-15    <johan AT FRIJA>
10905
10906         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
10907         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
10908
10909 2001-09-11    <johan AT FRIJA>
10910
10911         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
10912
10913 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
10914
10915         * support/regression/tests/bug-460444.c: Added test case.
10916
10917         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
10918         (genCast): Added justification for all of the asserts.
10919
10920 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
10921
10922         * support/regression/support.c: _xdata replaced by xdata
10923
10924         * support/regression/spec.mk: removed _generic
10925
10926 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
10927
10928         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
10929
10930         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
10931         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
10932
10933         * src/z80/peeph.def: Added a rule to optimise shift then compare.
10934
10935         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
10936
10937         * support/regression/tests/bug-460010.c: Added test case.
10938
10939         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
10940
10941 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
10942
10943         * support/regression/Makefile: inter-port-clean adjusted for mcs51
10944
10945         * support/regression/testfwk.c: removed workaround for bug #436344
10946
10947         * support/regression/tests/bp.c: use less memory with mcs51
10948
10949         * support/regression/tests/bug-441448.c: use less memory
10950
10951         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
10952
10953         * support/regression/collate-results.py: typo
10954
10955 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
10956
10957         * support/regression/tests/fetchoverlap.c: Added new test case.
10958
10959         * support/regression/tests/bp.c: Added new test case.
10960
10961         * support/regression/tests/bug-448984.c: Added new test case.
10962
10963         * support/regression/tests/pow2shifts.c: Added new test case.
10964
10965         * src/z80/gen.c: Turned off the noise it normally generates for the release.
10966         (genlshTwo): Fixed right shift for count > 8.
10967
10968         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
10969
10970 2001-09-08    <johan AT FRIJA>
10971
10972         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
10973
10974 2001-09-07    <johan AT FRIJA>
10975
10976         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
10977
10978         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
10979
10980 2001-09-06    <johan AT FRIJA>
10981
10982         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
10983         * bernhard noted me at this: "() equals to (void)" (1.38)
10984
10985 2001-09-05    <johan AT FRIJA>
10986
10987         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
10988
10989 2001-09-04    <johan AT FRIJA>
10990
10991         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
10992
10993
10994 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
10995
10996         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
10997
10998 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
10999
11000         * link/z80/aslink.h: Fixed path for PATH_MAX
11001
11002 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
11003
11004         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
11005
11006         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
11007
11008         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
11009
11010         * 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.
11011
11012 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
11013
11014         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
11015         (genCmp): Fixed up genCmp for the GB with longs.
11016
11017         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
11018
11019         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
11020
11021         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
11022
11023         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
11024
11025 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
11026
11027         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
11028
11029 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
11030
11031         * 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.
11032
11033         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
11034
11035 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
11036
11037         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
11038
11039         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
11040
11041 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
11042
11043   * sim/ucsim/configure:    little improvement of Cygwin-detection
11044   * sim/ucsim/configure.in: little improvement of Cygwin-detection
11045   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
11046   * support/regression/tests/bug-221100.c: small changes for mcs51
11047   * support/regression/tests/bug-221168.c: small changes for mcs51
11048   * support/regression/tests/bug-227710.c: small changes for mcs51
11049   * support/regression/tests/staticinit.c: small changes for mcs51
11050   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
11051   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11052   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
11053
11054 $Revision$