* src/SDCC.lex (doPragma, process_pragma),
[fw/sdcc] / ChangeLog
1 2004-09-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2
3         * src/SDCC.lex (doPragma, process_pragma),
4         * src/SDCCglobl.h (struct optimize): added pragmas "opt_code_speed",
5         "opt_code_size", and "opt_code_balanced"
6         * src/SDCCmain.c (optionsTable[], printOptions, scanOptionsTable):
7         regrouped options by category, added support for category headers
8         * src/SDCCmain.c (parseCmdLine): added options "--opt-code-speed"
9         and "--opt-code-size"
10         * doc/sdccman.lyx: documented these new options and pragmas
11         * src/hc08/gen.c (AccLsh, AccRsh): take speed/size optimization
12         preference into account
13
14 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
15
16         * src/SDCCicode.c (geniCodePostInc, geniCodePreInc, geniCodePostDec,
17           geniCodePreDec): Fixed bug 904237 by generating a warning
18         * src/SDCCerr.h,
19         * src/SDCCerr.c: added warning W_SIZEOF_VOID
20
21 2004-09-09 Slade Rich <slade_rich AT users.sourceforge.net>
22
23         * src/pic/device.c : When no max ram set validate full memory range.
24         * src/pic/pcode.c,
25         * src/pic/pcodepeep.c : Copy C code comments to optimised replacement code.
26
27 2004-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
28
29         * device/lib/_gptrget.c,
30         * device/lib/_gptrput.c: updated comment
31         * device/lib/calloc.c,
32         * device/lib/free.c,
33         * device/lib/malloc.c,
34         * device/lib/realloc.c: added LGPL, made them reentrant-safe
35         * src/SDCCcse.c (cseBBlock),
36         * src/SDCCicode.c (printOperand, geniCodeArray),
37         * src/SDCCicode.h (struct operand): fixed bug 868103
38         * support/regression/tests/bug-868103.c: added
39         * src/SDCCast.c (searchLitOp),
40         * src/SDCCcse.h (struct cseDef),
41         * src/SDCCglue.c (printIvalArray, spacesToUnderscores),
42         * src/SDCCicode.h (struct operand),
43         * src/SDCCsymt.h (struct sym_link),
44         * src/avr/gen.c (hasInc),
45         * src/ds390/gen.c (hasInc),
46         * src/hc08/gen.c (genPlusIncr, hasInc),
47         * src/mcs51/gen.c (hasInc),
48         * src/pic16/glue.c (pic16_printIvalChar),
49         * src/pic16/ralloc.c (regWithIdx),
50         * src/xa51/gen.c (hasInc) : removed warnings
51         * src/SDCCast.c (createBlock): added comment ???
52         * src/hc08/ralloc.c: updated comments
53
54 2004-09-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
55
56         * doc/sdccman.lyx: updated section on switch statements, added
57         section about semaphore locking
58         * doc/Makefile: added option -info for latex2html
59         * device/lib/_gptrget.c,
60         * device/lib/_gptrput.c: __XPAGE instead of P2 in outcommented code
61
62 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
63
64         * src/pic/device.h,
65         * src/pic/device.c,
66         * src/pic/port.c : Changed PIC14 code to not set bit RP1 when
67          maxram is less than 0x100.
68
69 2004-09-06 Slade Rich <slade_rich AT users.sourceforge.net>
70
71         * Bug fixes for PIC14 - signed RSHIFT problem. Patch supplied by Allen(agschrum).
72
73 2004-09-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
74
75         * src/port.h,
76         * src/mcs51/main.c,
77         * src/ds390/main.c,
78         * src/z80/main.c,
79         * src/hc08/main.c,
80         * src/pic/main.c,
81         * src/pic16/main.c,
82         * src/avr/main.c,
83         * src/xa51/main.c
84         * src/SDCCicode.c (geniCodeJumpTable): Better logic to determine if a
85         a jump table is the best form for a switch statement, including
86         automatic insertion of missing cases to make the case range
87         continuous. Developed in collaboration with Frieder Ferlemann.
88
89 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
90
91         * src/hc08/ralloc.c (canDefAccResult): multi-byte shift is unsafe for
92         accumulator result if it needs sign extension
93
94 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
95
96         * src/hc08/ralloc.c (canUseAccOperand): fixed comparison bug
97
98 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
99
100         * device/lib/gbz80/printf.c,
101         * device/lib/z80/printf.c: removed define for NULL
102
103 2004-09-02 Maarten Brock <sourceforge.brock AT dse.nl>
104
105         * as/xa51/xa_link.c,
106         * device/examples/ds390/ow390/ad26.c,
107         * device/examples/ds390/ow390/cnt1d.c,
108         * device/examples/ds390/ow390/counter.c,
109         * device/examples/ds390/ow390/ds2480.h,
110         * device/examples/ds390/ow390/ds2480ut.c,
111         * device/examples/ds390/ow390/findtype.c,
112         * device/examples/ds390/ow390/gethumd.c,
113         * device/examples/ds390/ow390/owllu.c,
114         * device/examples/ds390/ow390/ownetu.c,
115         * device/examples/ds390/ow390/swt12.c,
116         * device/examples/ds390/ow390/swtloop.c,
117         * device/examples/ds390/ow390/temp.c,
118         * device/examples/ds390/ow390/temp10.c,
119         * device/examples/ds390/ow390/thermo21.c,
120         * device/examples/ds390/ow390/tinilnk.c,
121         * device/examples/ds390/ow390/tstfind.c,
122         * device/examples/serialcomm/windows/serial.cpp,
123         * device/examples/serialcomm/windows/test_serialcomm.cpp,
124         * device/include/reg51.h: fixed line endings for cvs
125
126 2004-09-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
127
128         * src/hc08/ralloc.c (canDefAccResult, canUseAccOperand,
129         packRegsForAccUse, packRegisters): new accumulator register
130         packing algorithm
131         * support/regression/ports/hc08/support.c (_putchar): suppress
132         warning of unused variable
133         * src/SDCCicode.c: added SWAP entry to codeTable
134
135 2004-09-01 Maarten Brock <sourceforge.brock AT dse.nl>
136
137         * device/lib/sprintf.c: forgot to add this file before previous commit
138
139 2004-09-01 Vangelis Rokas <vrokas AT otenet.gr>
140
141         * src/pic16/gen.c (genPackBits): added operand right in function
142         parameters, load result directly if p_type is POINTER (that is
143         called by genNearPointerSet)
144         * (genUnPackBits): added operand left in function parameters,
145         * (genNearPointerGet, genNearPointerSet): prevent the loading of
146         FSR0 if accessing bitfields,
147
148 2004-08-31 Maarten Brock <sourceforge.brock AT dse.nl>
149
150         * device/include/stdio.h: added NULL, size_t, typedef pfn_outputchar,
151           _print_format; updated printf, sprintf, vsprintf
152         * device/include/asm/default/features.h: corrected comment/define
153         * device/lib/Makefile.in: added sprintf.c
154         * device/lib/libsdcc.lib: added sprintf module
155         * device/lib/printf_large.c,
156         * device/lib/vprintf.c,
157         * device/lib/sprintf.c: totally refactored printf_large and vprintf
158           into these 3 files
159         * support/regression/Makefile: changed ALL_PORTS into a usefull default
160         * support/regression/ports/mcs51-stack-auto/spec.mk: added sprintf
161         * support/regression/tests/bug-927659.c: removed dummy putchar, enabled
162           hc08 test
163         * support/regression/tests/zeropad.c: define idata as data for hc08
164
165 2004-08-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
166
167         * src/SDCCpeeph.c (labelIsReturnOnly): support hc08 rts opcode also
168         * src/SDCCpeeph.c (buildLabelRefCountHash): assume function entry point
169         labels are referenced at least once (even if a reference is not found)
170         * src/hc08/gen.c (emitcode): set isComment flag for comments
171         * src/hc08/peeph.def: added rules 5a..5f (optimize redundant immediate
172         loads), rules 6a..6b (optimize jumps to return)
173
174 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
175
176         * device/lib/acosf.c (acosf),
177         * device/lib/asinf.c (asinf),
178         * device/lib/atanf.c (atanf),
179         * device/lib/ceilf.c (ceilf),
180         * device/lib/cosf.c (cosf),
181         * device/lib/coshf.c (coshf),
182         * device/lib/cotf.c (cotf),
183         * device/lib/fabsf.c (fabsf),
184         * device/lib/floorf.c (floorf),
185         * device/lib/log10f.c (log10f),
186         * device/lib/logf.c (logf),
187         * device/lib/sinf.c (sinf),
188         * device/lib/sinhf.c (sinhf),
189         * device/lib/sqrtf.c (sqrtf),
190         * device/lib/tanf.c (tanf),
191         * device/lib/tanhf.c (tanhf),
192         * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
193         replaced all instances of "reentrant" in the library functions
194         defined in math.h with this macro.
195         * support/regression/tests/float_trans.c: reenabled test for hc08
196
197 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
198
199         * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
200         erroneously deleted
201
202 2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
203
204         * src/hc08/gen.c (loadRegFromAop): better use of clra & clrx
205         * src/hc08/gen.c (genAnd, genOr): fixed bug with conditional when
206         multi-byte volatile operands are used
207         * src/hc08/gen.c (shiftRLong): fixed bug with wrong rotate direction
208         * src/hc08/main.c (_hc08_genAssemblerPreamble): moved the built-in
209         initialization to area GSINIT0 so that it would always precede
210         any static initializers in GSINIT
211         * support/regression/tests/zeropad.c: fixed idata define for hc08
212         * support/regression/tests/bug-927659.c,
213         * support/regression/tests/float_trans.c: disabled tests for hc08
214         pending missing library routines
215         * .version: increased version number to 2.4.4 - hc08 port now passes
216         regression tests
217
218
219 2004-08-29 Bernhard Held <bernhard AT bernhardheld.de>
220
221         * device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
222         * Makefile.common.in,
223         * as/Makefile,
224         * as/hc08/Makefile.in,
225         * as/mcs51/Makefile.in,
226         * as/z80/Makefile.in,
227         * debugger/mcs51/Makefile.in,
228         * device/include/Makefile.in,
229         * device/lib/Makefile.in,
230         * doc/Makefile,
231         * link/Makefile,
232         * link/z80/Makefile.in,
233         * packihx/Makefile.in,
234         * sim/ucsim/main_in.mk,
235         * sim/ucsim/avr.src/Makefile.in,
236         * sim/ucsim/doc/Makefile.in,
237         * sim/ucsim/gui.src/serio.src/Makefile.in,
238         * sim/ucsim/hc08.src/Makefile.in,
239         * sim/ucsim/s51.src/Makefile.in,
240         * sim/ucsim/xa.src/Makefile.in,
241         * sim/ucsim/z80.src/Makefile.in,
242         * src/Makefile.in,
243         * support/cpp2/Makefile.in,
244         * support/librarian/Makefile,
245         * support/makebin/Makefile: added DESTDIR to the install path proposed
246         by "Maciej 'Agaran' Pijanka" <agaran AT pld-linux.org>
247         * doc/sdccman.lyx: added DESTDIR documentation
248
249 2004-08-29 Vangelis Rokas (vrokas AT otenet.gr>
250
251         * src/pic16/gen.c (genFunction, genEndFunction): fixed return
252         instruction for interrupt handlers, use fast returns when returning
253         from high priority interrupts
254
255 2004-08-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
256
257         * src/hc08/gen.c (genAnd, genOr, transferAopAop, rmwWithAop): optimized
258         code generation
259         * src/hc08/gen.c (genrshFour, genCpl): fixed bugs
260         * src/hc08/gen.c (genMultOneByte, genDivOneByte, genModOneByte): fixed
261         bugs, ported much of Bernhard's code from mcs51
262         * src/mcs51/gen.c (genSend),
263         * src/hc08/gen.c (genSend): fixed bug with lost SEND iCodes if more
264         than one when calling a reentrant function
265         * device/lib/_mullong.c: defined an alternate struct layout for big
266         endian ports (hc08)
267
268 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
269
270         * src/hc08/gen.c (shiftL2Left2Result): fix for bug-500536 regression
271         test
272
273 2004-08-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
274
275         * src/SDCCsymt.c (processFuncArgs): make sure parameter types
276         are sane and complete before asking the port its prefered parameter
277         passing method (fixes bug #1017633)
278         * device/lib/hc08/_ret.c: added "data" storage class to _ret2
279         and _ret3
280
281 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
282
283         * src/hc08/gen.c (genPackBitsImmed, genUnpackBitsImmed): fix offset
284         problem in bitfields >= 8 bits.
285
286 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
287
288         * src/SDCCsymt.c: undid changes that were not meant to be committed
289
290 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
291
292         * support/regression/ports/hc08spec.mk: REENTRANT must be reentrant
293
294 2004-08-27 Maarten Brock <sourceforge.brock AT dse.nl>
295
296         * src/hc08/gen.c (genUminusFloat): fixed bug where only 3 bytes were
297           copied and wrong bit got inverted
298
299 2004-08-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
300
301         * src/hc08/gen.c (genPointerSet, genFarPointerSet): moved code from
302         genFarPointerSet into genPointerSet; eliminated genFarPointerSet
303         * src/hc08/gen.c (genPointerGet, genFarPointerGet): moved code from
304         genFarPointerGet into genPointerGet; eliminated genFarPointerGet
305         * src/hc08/gen.c (genPackBitsImmed): generate optimized code for
306         assignments to bitfields at known addresses
307         * src/hc08/gen.c (genUnpackBitsImmed): generate optimized code for
308         reads from bitfields at known addresses
309         * src/hc08/ralloc.c (packRegisters),
310         * src/hc08/gen.c (genPointerGet, genUnpackBits, genUnpackBitsImmed,
311         genhc08Code): optimize pointer get values used as conditionals
312         * src/hc08/peeph.def: added rules 2e & 2f to optimize bit test
313         and branch
314
315 2004-08-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
316
317         * src/mcs51/gen.c (genPointerGet, genNearPointerGet, genPagedPointerGet,
318         genFarPointerGet, genCodePointerGet, genGenPointerGet, genUnpackBits),
319         * src/mcs51/ralloc.c (packRegisters): optimize pointer get values used
320         as conditionals
321
322 2004-08-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
323
324         * src/mcs51/peeph.def: peepholes 248.i-m for xdata bitfields
325
326 2004-08-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
327
328         * src/mcs51/ralloc.c (packRegsForOneuse): fixed bug #1012650 and some
329         related problems
330
331 2004-08-21 Bernhard Held <bernhard AT bernhardheld.de>
332
333         * sim/ucsim/cmd.src/Makefile.in: run lex only if $(PRJDIR)/devel exists
334
335 2004-08-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
336
337         * src/z80/ralloc.c (packRegsForAssign): ported some bug fixes from the
338         mcs51 port
339
340 2004-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
341
342         * src/pic/gen.c: Restored fn genRet as previous fix was incorrect.
343
344 2004-08-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
345
346         * src/mcs51/gen.c (genJumpTab): jumptables for more than 16 switch
347         cases use more compact code.
348
349 2004-08-13 Slade Rich <slade_rich AT users.sourceforge.net>
350
351         * src/pic/gen.c: Fixed problem with fn returning a variable bigger than a char.
352
353 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
354
355         * src/SDCClrange.c (findPrevUse): fixed bug #1007371
356
357 2004-08-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
358
359         * src/SDCCsymt.h,
360         * src/SDCCsymt.c (changePointer, checkDecl, addSymChain): changed
361         parameter of changePointer() from symbol* to sym_link*
362         * src/SDCCast.c (decorateType): call changePointer() for CAST op
363         * src/SDCCsymt.c (compareType): void* type is castable to other
364         pointers, but not necesarily an exact match.
365         * src/SDCCicode.c (geniCodeCast): allow void* casting here since it
366         is no longer blindly treated as an exact match.
367         * src/SDCCval.c (valCastLiteral): treat missing type as cast to void
368
369 2004-08-12 Slade Rich <slade_rich AT users.sourceforge.net>
370
371         * src/pic/glue.c: Added struct initialisation fn printIvalStruct.
372
373 2004-08-11 Slade Rich <slade_rich AT users.sourceforge.net>
374
375         * src/pic/gen.c,
376         * src/pic/pcode.c,
377         * src/pic/ralloc.h,
378         * src/pic/ralloc.c: Printing rIdx on internal verbose debug.
379
380 2004-08-10 Slade Rich <slade_rich AT users.sourceforge.net>
381
382         * src/pic/device.c,
383         * src/pic/device.h,
384         * src/pic/device.c: Will no longer exit if #pragma maxram has not been defined.
385
386 2004-08-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
387
388         * src/mcs51/gen.c (emitcode): fixed bug #992819
389
390 2004-08-05 Maarten Brock <sourceforge.brock AT dse.nl>
391
392         * src/pic/ralloc.c (deassignLR): allthough pic port is buggy already,
393           there's no need to make it worse
394
395 2004-08-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
396
397         * src/mcs51/ralloc.c (deassignLR),
398         * src/ds390/ralloc.c (deassignLR),
399         * src/hc08/ralloc.c (deassignLR),
400         * src/z80/ralloc.c (deassignLR),
401         * src/pic/ralloc.c (deassignLR),
402         * src/pic16/ralloc.c (deassignLR),
403         * src/avr/ralloc.c (deassignLR),
404         * src/SDCClrange.c (findRecursiveSucc, findRecursivePred, findPrevUse,
405         rlivePoint): fixed another part of bug #971834
406
407 2004-08-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
408
409         * src/z80/main.c: enabled "critical" keyword
410         * src/z80/mappings.i,
411         * src/z80/gen.c (genFunction, genEndFunction): support for interrupt
412         functions (fixes bug #979646)
413         * doc/sdccman.lyx: added a subsection explaining z80 interrupt support
414
415 2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
416
417         * src/mcs51/gen.c (genInline): Add \n for labels, not DOS/WIN dirs
418           such as c:\mydir.
419
420 2004-08-03 Maarten Brock <sourceforge.brock AT dse.nl>
421
422         * src/SDCCloop.c (loopInvariants): fixed bug 983545, hope this
423           doesn't disable too much optimizations
424
425 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
426
427         * src/pic/glue.c Disabled "WARNING: function 'main' undefined" when -S option is used.
428
429 2004-08-02 Maarten Brock <sourceforge.brock AT dse.nl>
430
431         * src/SDCClrange.c (rlivePoint): fixed bug 988568, thanks to anonymous
432
433 2004-08-02 Slade Rich <slade_rich AT users.sourceforge.net>
434
435         * src/pic/gen.c tidied up tabs
436         * src/pic/genarith.c tidied up tabs and fixed bug with literal multiple where same register was used for hi and low byte
437         * src/pic/main.c tidied up tabs
438         * src/pic/pcode.c tidied up tabs and disabled verbose code generation
439         * src/pic/pcoderegs.c tidied up tabs
440         * src/pic/ralloc.c tidied up tabs
441
442 2004-07-30 Vangelis Rokas <vrokas AT otenet.gr>
443
444         * src/SDCCmem.c (allocGlobal): don't turn S_REGISTER storage class
445         to S_FIXED for pic16 port and when symbol is not in level 0,
446         allocate for S_REGISTER storage class and pic16 port, too,
447         * src/pic16/device.h: prototype for checkSym,
448         * src/pic16/device.c (pic16_dump_access, checkSym): NEW,
449         * (pic16_assignConfigWordValue): test the value and the mask to
450         validate that the value is suitable for the configuration word,
451         * src/pic16/glue.c (pic16_printIvalFuncPtr): use 'externs' to
452         collect extern declared symbols, don't emit symbol twice, check
453         first if symbol is in publics set first,
454         * src/pic16/main.c (_pic16_keywords[]): added keyword 'register',
455         * added command line '--fstack' which enables an experimental
456         feature for stack access, too buggy to be used yet...
457         * src/pic16/ralloc.c (pic16_accessregWithName): NEW,
458         * (pic16_allocDirReg): when register has storage class S_REGISTER
459         allocate in pic16_dynAccessRegs,
460         * device/include/pic16/pic18f????.h: modified configuration word
461         naming convention, words started as CONFIG0H but should be CONFIG1H
462
463 2004-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
464
465         * device/include/mcs51reg.h: fixed bug 970993
466
467 2004-07-27 Maarten Brock <sourceforge.brock AT dse.nl>
468
469         * added lib/calloc.c, lib/free.c, lib/realloc.c, include/stddef.h
470         * updated lib/malloc.c, lib/libsdcc.lib, lib/Makefile.in, include/malloc.h
471         * src/SDCC.lex (doPragma): added pragma disable_warning <nnn>
472         * src/SDCCmain.c (parseCmdLine): added option --disable-warning <nnn>
473         * src/ds390/gen.c (genPlusIncr): fixed bug when incrementing generic pointers
474         * support/Util/SDCCerr.c (vwerror): suppress disabled warnings and output
475           error/warning numbers,
476           added function setWarningDisabled()
477         * support/Util/SDCCerr.h: added setWarningDisabled() and MAX_ERROR_WARNING
478         * support/regression/ports/mcs51-stack-auto/spec.mk: added dependencies
479           _memcmp.c _memmove.c calloc.c realloc.c free.c
480         * support/regression/tests/malloc.c: added tests for new functionality
481         * support/regression/tests/zeropad.c: added tests for truncated initializers
482           and initialized char arrays starting with '\x0'
483         * src/mcs51/peeph.def: fixed regression, added peephole 177.f
484
485 2004-07-26 Bernhard Held <bernhard AT bernhardheld.de>
486
487         * support/valdiag/tests/overflow.c: fixed warning on (1 >> 40)
488
489 2004-07-26 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
490
491         * doc/sdccman.lyx: updated example in section "Absolute Addressing"
492         * src/mcs51/peeph.def: added contributed fix for "bug" #995347 as
493         peephole 177.e. Thanks to anonymous
494
495 2004-07-25 Vangelis Rokas <vrokas AT otenet.gr>
496
497         * src/pic16/glue.c (pic16_printIvalFuncPtr): when an extern
498         function isn't used in the source but referenced as a
499         variable initializer then declare it as extern in .asm file
500
501 2004-07-24 Vangelis Rokas <vrokas AT otenet.gr>
502
503         * .version: increased version number to 2.4.3
504
505         Adding version extension according to ChangeLog CVS revision
506         * src/Makefile.in (target all): added dependency 'version.h'
507         * (rule version.h): added rule to create version.h from ChangeLog,
508         * (rule dep): added dependency version.h,
509         * src/version.awk: AWK script to create version.h
510         * src/SDCCdwarf2.c (dwWriteModule),
511         * src/SDCCglue.c (initialComments),
512         * src/SDCCmain.c (printVersionInfo): modified to write after
513         version string the version extension number,
514         * src/SDCCutil.c: included "version.h"
515         * (getBuildNumber): NEW, returns SDCC's ChangeLog minor revision
516         number,
517         * src/SDCCutil.h: added prototype for getBuildNumber
518
519         * src/SDCCmain.c (parseCmdLine): when sOpt is 'I' add rest in
520         includeDirsSet, too,
521         * src/SDCCsymt.c (checkSClass): don't emit error when a variable,
522         const char [] is found in function prototype...
523
524         * src/pic16/genarith.c (pic16_genUMult8XLit_8): optimization to omit
525         moving to WREG with source is already in WREG,
526         * src/pic16/gen.h: added AOP_FSR0 and AOP_FSR2 in enum,
527         * src/pic16/gen.c (getFreePtr): updated to look for FSR0 and FSR2,
528         * (aopForSym): stack'ed symbols are partially supported, added
529         if-clause to support symbols in FARSPACE,
530         * (sameRegs): added test for AOP_ACC to see if registers are same,
531         * (pic16_freeAsmop): added case for AOP_FSR0 and AOP_FSR2,
532         * (pic16_aopGet): added case for AOP_FSR0 and AOP_FSR2,
533         * (pic16_popRegFromString): will not allocate a new register if it
534         doesn't find one by name, bug may have introduced...
535         * (pic16_popGet): added case for AOP_FSR0 and AOP_FSR2,
536         * (genIpush): revived to use pic16 port's stack,
537         * (genAddrOf): added incomplete case for stack'ed operand,
538         * (genCast): optimized a pair of MOVFW,MOVWF to MOVFF
539         * src/pic16/genutils.c (pic16_genNot): almot new vesrion for NOT,
540         can handle multibyte operands,
541         * src/pic16/glue.c (pic16_printIval*): some debug info added,
542         * (pic16initialComments): added message for MPLAB compatibility
543         mode enabled,
544         * src/pic16/main.h: prototype for pic16_mplab_comp,
545         * src/pic16/main.c (pic16_optionsTable): new option --mplab-comp,
546         which enabled MPLAB compatibility mode (i.e. no #LINE/#FILE, BANKED)
547         * (_pic16_linkEdit): NEW, handles link stage, transferred here
548         because of increased complexity of procedure,
549         * (_process_pragma): stack pragma changed to format 'stack pos len',
550         emit symbol '_stack_end' to conform with gplink,
551         * src/pic16/pcode.c (pic16_newpCodeOpBit): using pic16_regWithName
552         to search for register,
553         * (pic16_get_op, pic16_get_op2): added case for PO_W, PO_WREG and
554         PO_GPR_REGISTER,
555         * (pic16_pCode2str): when in MPLAB compatibility mode, comment out
556         #LINE directives and replace 'B' with 'BANKED' in instruction opcodes
557         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
558         case for PO_GPR_REGISTER,
559         * (pic16_AnalyzeBanking): removed the old message for inc2h.pl, past
560         dies, the new era is ahead !...
561         * src/pic16/ralloc.c: added hash reposits pic16_dynAllocRegNames and
562         pic16_dynInternalRegs,
563         * (pic16_allocregWithName, pic16_procregWithName, pic16_regWithname): NEW,
564         * (pic16_allocDirReg): minor optimizations and bug fixes,
565         * (pic16_allocWithIdx): when searching pic16_dynProcessorRegs use fixed,
566
567         * device/lib/pic16/startup/crt0*.c: extern definition of stack_end,
568         load stack and frame pointer with address of 'stack_end' symbol
569
570 2004-07-23 Vangelis Rokas <vrokas AT otenet.gr>
571
572         * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files
573         without source code but only variable initializers
574
575 2004-07-20 Vangelis Rokas <vrokas AT otenet.gr>
576
577         * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as
578         external are not declared as extern to reduce overhead while linking
579
580 2004-07-20 Maarten Brock <sourceforge.brock AT dse.nl>
581
582         * src/SDCCast.c (decorateType): removed buggy fix for bug #979599
583
584 2004-07-11 Maarten Brock <sourceforge.brock AT dse.nl>
585
586         * src/SDCCglue.c (printIvalArray): fixed bug #984229, thanks to Phuah
587           Yee Keat for the patch
588         * src/SDCCast.c (decorateType): fixed bug #979599
589         * src/ds390/gen.h: removed local fReturnSizeDS390
590         * src/ds390/gen.c: made fReturnSizeDS390 signed short to remove a warning
591         * src/ds390/gen.c (genAnd, genOr, genXor),
592         * src/mcs51/gen.c (genAnd, genOr, genXor): generate better optimized code
593
594 2004-07-04 Vangelis Rokas <vrokas AT otenet.gr>
595
596         * src/SDCCmain.c (linkEdit): modifications only for pic16 port,
597         add relFilesSet to $3, manipulate $2 to handle linking of object
598         files without source files in command line,
599         * device/include/pic16 (all headers): added ID location macros,
600         * src/pic16/device.c (struct PIC16_device Pics16[]): added field
601         entries for ID location bytes,
602         * (pic16_assignIdByteValue): NEW,
603         * src/pic16/device.h: new structures idRegInfo_t and idBytesInfo_t,
604         added field dumpcalltree to pic16_options_t,
605         * src/pic16/gen.c (genCmp): fixed bug case so a temporary register
606         is used instead of pic16_Gstack_base_addr, check if (ifx) before
607         emitting rFalseIfx label after check_carry label,
608         * src/pic16/glue.c (PIC16_IS_IDLOC_ADDRESS, PIC16_IS_HWREG_ADDRESS,
609         pic16_emitDIRegs), NEW
610         * (pic16glue): dump .calltree file when option --calltree found,
611         * src/pic16/main.c (OPTION _pic16_optionsTable): new option --calltree
612         * (_pic16_genAssemblerPreamble): emit ID locations after
613         configuration registers,
614         * (pic16_linkCmd): modifications of the link command,
615         * src/pic16/pcode.c (pic16_pciMOVFF): PCC_REGISTER replaces PCC_REGISTER2
616         * (pic16_pCodeInitRegisters): don't init stack registers,
617         * (pic16_findPrevInstruction): fixed bug,
618         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): fixed
619         bug with immediate registers,
620         * (buildCallTree): traces stack push and pop,
621         * (pct2): dump also stack usage for each function,
622         * src/pic16/ralloc.c (dynrIdx): registers names start from 0x00
623         * (pic16_allocDirReg): various modifications,
624         * (pic16_typeRegWithIdx): when searching pic16_dynProcessorRegs set
625         fixed to 1,
626
627 2004-07-02 Vangelis Rokas <vrokas AT otenet.gr>
628
629         * src/pic16/pcode.c: removed buggy double colon
630
631 2004-07-01 Borut Razem <borut.razem AT siol.net>
632
633         * support/scripts/sdcc.nsi: added include/pic16 to setup
634
635 2004-06-30 Vangelis Rokas <vrokas AT otenet.gr>
636
637         * device/lib/Makefile.in: fixed bug in target objects-pic16,
638         * device/lib/pic16/Makefile: prefixed with dash (-) command under
639         target 'clean',
640         * doc/sdccman.lyx: changed version to 2.4.2 and added some port
641         specific command line arguments. Also added sample lkr script
642         for placing a variable at a specific memory bank.
643         * src/pic16/device.c (pic16_dump_gsection): NEW, to dump variables
644         at a specific memory bank,
645         * (pic16_dump_isection): fixed bug which caused string literals to
646         be omitted when dumping idata section,
647         * (pic16_groupRegistersInSection): added code to handle registers
648         in specific memory banks,
649         * src/pic16/gen.c: labelOffset is prefixed with pic16_ and made
650         public, all references are renamed too,
651         * (pic16_aopGet): removed switch cases for AOP_R0,AOP_R1,AOP_DPTR,
652         AOP_DPTR2,
653         * (pic16_storeForReturn): added case to handle when dest is WREG,
654         * src/pic16/genarith.c (pic16_pCodeOpSubType): NEW,
655         * src/pic16/glue.c (pic16emitRegularMap): when adding a register in
656         pic16_rel_udata, check to see if that register is marked as being
657         a member of a specific memory bank,
658         * (pic16_printIvalCharPtr): added code to add string literals either
659         to code or the idata sections,
660         * src/pic16/main.c (_process_pragma): added \n to WHITE constant,
661         also accept the 'udata' pragma,
662         * src/pic16/main.h: new structure types sectName and sectSym
663         * src/pic16/pcode.c: added new pCodeInstruction entry for BANKSEL
664         * (newpCodeOpBit): added PIC_OPTYPE subt in function prototype,
665         * (pic16_findPrevInstruction): fixed, it returned nothing,
666         * (insertBankSwitch): fixed to emit banksel/skip and skip/banksel
667         instruction combinations,
668         * (pic16_FixRegisterBanking): heavily reorganised,
669         * (pic16_AnalyzeBanking): if generating banksel directives is
670         disabled, then don't call FixRegisterBanking at all,
671         * src/pic16/ralloc.c (bitEQUs, aliasEQUs, allDefsOutOfRange):
672         completely removed,
673         * (pic16_writeUsedRegisters): added call to pic16_dump_gsection
674
675 2004-06-29 Bernhard Held <bernhard AT bernhardheld.de>
676
677         * src/SDCCglue.c (printChar): fixed bug #973350, patch provided by
678         Phuah Yee Keat <yk.phuah AT nestac.com>
679
680 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
681
682         * src/pic16/glue.c (pic16createInterruptVect): function now emits
683         correctly the IVT even if it is relocated to some other location
684
685 2004-06-28 Vangelis Rokas <vrokas AT otenet.gr>
686
687         * device/include/pic16/pic18fregs.h: added case for pic18f2220.h
688         * device/include/pic16/pic18f2220.h: NEW,
689         * device/lib/pic16/libdev/pic18f2220.c: NEW,
690         * device/lib/pic16/libdev/Makefile: added 18f2220 in DEVS,
691         * src/pic16/device.c (struct Pics16): added info for 18f2220,
692         * src/pic16/device.h (struct pic16_options): added ivt_loc and
693         nodefaultlibs, ivt_loc is the location of the interrupt vector
694         table, and nodefaultlibs signs that default libraries should not be
695         linked in link stage,
696         * src/pic16/gen.c (genFunction): relocate interrupt vector functions
697         according to --ivt-loc argument,
698         * src/pic16/main.c (_process_pragma): emit '_stack' as public symbol
699         when pragma stack is found,
700
701 2004-06-25 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
702
703         * src/mcs51/peeph.def: added peepholes 182.d (return 0.0),
704         256 (range check), 257 (do while), 258.a-f (bit banging
705         f.e. on 3-wire SPI bus)
706
707 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
708
709         * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
710         variables used exclusively within a loop
711
712 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
713
714         * src/mcs51/gen.c (genCpl): quick fix for bug #974835
715
716 2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
717
718         * src/SDCClrange.c (computeClash): fixed bug #971834
719
720 2004-06-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
721
722         * src/mcs51/gen.c (genCmp): fixed bug #975903
723         * src/hc08/gen.c (operandsEqu),
724         * src/ds390/gen.c (operandsEqu),
725         * src/z80/gen.c (operandsEqu),
726         * src/pic/gen.c (operandsEqu),
727         * src/pic16/gen.c (operandsEqu),
728         * src/mcs51/gen.c (operandsEqu): fixed bug #976283
729         * src/SDCCmain.c (parseCmdLine): report --unknown-option only once
730
731 2004-06-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
732
733         * src/SDCCcse.c (cseBBlock): fixed bug #966963
734
735 2004-06-12 Vangelis Rokas <vrokas AT otenet.gr>
736
737         * src/pic16/gen.c (genPointerGet): added E_INTERNAL_ERROR for
738         default case in switch statement,
739         * glue.c (pic16_initPointer): expr is initialised via decoarteType
740         to eliminate problem with initialisation of pointers, but problem
741         still exists,
742         * (pic16_pointerTypeToGPByte): removed, no needed for pic16,
743         * (emitStaticSegment): removed various lines emitting debug info,
744         * src/pic16/pcode.c, src/pic16/pcode.h, src/pic16/ralloc.h:
745         added processor registers for utilizing EEPROM,
746         * src/pic16/pcode.c (pic16_emitDB): number of DBs emitted is not
747         configurable and set 8
748
749 2004-06-08 Vangelis Rokas <vrokas AT otenet.gr>
750
751         * .version: increased version number to 2.4.2,
752
753         Cumulative patch for pic16 port
754         * src/pic16/device.c: changed scheme to dump initial values for
755         variables in idata segment, all print_idata* functions were removed,
756         now the pic16_printIval* will be called,
757         * src/pic16/glue.c: (pic16_initPointer, pic16_pointerTypeToGPByte,
758         * _pic16_printPointerType, pic16_printPointerType,
759         * pic16_printGPointerType, pic16_printIvalArray, pic16_printIvalStruct,
760         * pic16_printIvalBitFields, pic16_printIvalFuncPtr, pic16_printIvalPtr:
761         NEW, similar to the respective functions in SDCCglue.c,
762         * src/pic16/pcode.c (pic16_emitDB, pic16_flushDB): reverted to old
763         way, emitting hex bytes,
764         * (pic16_emitDS): NEW, emits a string for pointer initialisation,
765
766 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
767
768         * src/avr/ralloc.c (serialRegAssign),
769         * src/xa51/ralloc.c (serialRegAssign),
770         * src/pic/ralloc.c (serialRegAssign),
771         * src/pic16/ralloc.c (serialRegAssign),
772         * src/hc08/ralloc.c (serialRegAssign),
773         * src/z80/ralloc.c (serialRegAssign),
774         * src/ds390/ralloc.c (serialRegAssign),
775         * src/mcs51/ralloc.c (serialRegAssign): fixed bug #964479
776
777 2004-06-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
778
779         * src/SDCCicode.c (geniCodeJumpTable): fixed bug #967601
780         * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug #966505
781
782 2004-06-07 Vangelis Rokas <vrokas AT otenet.gr>
783
784         Cumulative patch for pic16 port:
785         * src/pic16/device.h (typedef PIC16_device) modified fields for
786         defining microcontrollers,
787         * src/pic16/device.c: added new info for all devices in Pics16 array,
788         * src/pic16/gen.c (genPcall): fixed bug that caused the return label
789         to be optimised out by the pCode optimiser,
790         * src/pic16/glue.c (pic16emitRegularMap): treat implicit aggragates
791         specially, bug reported by G.M. Gallant,
792         * src/pic16/pcode.c (pic16_newpCodeLabelFORCE): NEW, marks a label
793         as force'd so that cannot be optimised out by pCode optimiser,
794         * src/pic16/pcode.c,
795         * src/pic16/pcodepeeph.c,
796         * src/pic16/pcoderegs.c: many modifications to re-enable peepholes,
797         they are disabled by default, but can be enabled explicit with
798         command argument --denable-peeps, for testing,
799         * device/lib/pic16/startup/Makefile: added --no-peep,--pomit-config-words,
800         --pomit-ivt in COMPILE_FLAGS
801
802 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
803
804         * src/pic16/pcode.c (pic16_emitDB): removed double semicolon which fails
805           compilation on MSVC
806
807 2004-06-06 Maarten Brock <sourceforge.brock AT dse.nl>
808
809         * device/include/sab80515.h: added sfr P6, changed GPL to LGPL
810
811 2004-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
812
813         device/include/sab80515.h: fixed bug #967492, DAPR is defined at adress
814         0xd8, but the correct adress is 0xda. Thanks to anonymous for reporting
815
816 2004-06-06 Vangelis Rokas <vrokas AT otenet.gr>
817
818         * src/pic16/device.c (pic16_assignConfigWord): fixed bug that
819         would only assign 0x300001 register.
820
821 2004-06-05 Vangelis Rokas <vrokas AT otenet.gr>
822
823         * device/lib/pic16/startup/Makefile: added $(MODELFLAGS)
824         in COMPILE_FLAGS. Thanks to G. Gallant for report.
825
826 2004-06-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
827
828         * doc/sdccman.lyx: minor changes, mentioned beta vendor support
829         for ds80c400
830         * src/mcs51/peeph.def: ran unexpand -a over peeph.def
831         * src/mcs51/peeph.def: removed obsolete peephole 100.a,
832         added peephole 254 (left shift), 255 (jump table)
833
834 2004-06-04 Vangelis Rokas <vrokas AT otenet.gr>
835
836         * device/lib/Makefile.in: removed comment line with model-pic16,
837         * (target port-specific-objects-pic16): the libraries and objects
838         are copied to the build directory form the device/lib/pic16/bin
839         directory
840
841         Cumulative patch concerning pic16 port:
842         * library directory has been re-organized,
843         * added support for PIC18F1220,
844         * added headers and library sources for chips 18f1220,18f6520,
845         18f6620,18f6680,18f6720,18f8520,18f8620,18f8680,18f8720
846
847         * configuration registers setting has changed, now each supported
848         device has a complete description of the registers it uses,
849         * all initialisations are moved to idata sections, these section
850         can be absolute or relocatable,
851         * fixed initialisation of codespace variables,
852         * fixed warning about PCLATU and gpsim,
853         * src/pic16/gen.c (genCmp): now can handle partially iCodes with no ifx,
854         * (genAssign): use table reads when assigning from variables in codespace,
855         * src/pic16/glue.c (pic16emitStaticSeg): fixed to correctly initialise
856         char/int variables placed in codespace,
857         * (pic16_emitConfigRegs): NEW, emits a list with configuration
858         registers set in .asm file, no need for --pomit-config-words anymore,
859         * (pic16glue): some 8051 legacy segments are commented out
860         (to be removed completely),
861         * added support for alternative assembler and linker with --asm=
862         and --link= command line arguments,
863         * peepholes are disabled automatically in the port, no need to
864         specify on command line,
865         * port supports natively char/int/long multiplication, but converts
866         all divisions to support functions,
867         * main.c: pic16_linkCmd and pic16_asmCmd changed to force output
868         to the file set in variable $2,
869         * pcode.c (pic16_emitDB, pic16_flushDB): modified to print printable
870         strings in ASCII format and not in hex,
871         * ralloc.c (serialRegAssign): added a triplet of conditional calls
872         to pic16_allocDirReg for IC_RESULT, IC_LEFT and IC_RIGHT so to
873         allocate proper register if iCodes aren't temporary,
874
875 2004-06-02 Maarten Brock <sourceforge.brock AT dse.nl>
876
877         * support/regression/tests/zeropad.c: added TEST_G macro for alpha
878
879 2004-06-02 Vangelis Rokas <vrokas AT otenet.gr>
880
881         * src/pic16/gen.c (genPcall): warning about gpsim and PCLATU
882         is commented out
883
884 2004-06-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
885
886         * src/hc08/gen.c (genPointerGetSetOfs): disabled optimization if
887         computed address is reused
888         * src/hc08/gen.c (genPackBits): fixed offsets in assignments to
889         multi-byte bitfields
890
891 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
892
893         * src/z80/gen.c: (genArrayInit): must check for pointers too
894
895 2004-06-01 Maarten Brock <sourceforge.brock AT dse.nl>
896
897         * support/regression/tests/zeropad.c: never meant to commit the
898           nestedstruct test: removed, added check for GCC version
899
900 2004-05-31 Maarten Brock <sourceforge.brock AT dse.nl>
901
902         * src/SDCCast.c (createIvalArray): fixed bug 770487 SIGSEGV
903         * src/SDCCglue.c (emitRegularMap): fixed bug 770484 allocation problem
904         * src/SDCCglue.c (initPointer, printIvalType, printIvalStruct,
905           printIvalArray, printIvalFuncPtr, printIvalPtr, printIval): fixed
906           bugs 928906 and 954082 half-empty initializers
907         * src/SDCCsymt.h,
908         * src/SDCCsymt.c (getAllocSize): added for above fix
909         * src/z80/gen.c (genArrayInit): fixed bug 741044
910         * support/regression/tests/zeropad.c: added tests
911
912 2004-05-30 Vangelis Rokas <vrokas AT otenet.gr>
913
914         * src/pic16/device.c (pic16_dump_section): corrected bug which
915         caused some symbols of the libraries to be misplaced
916
917 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
918
919         * src/pic16/glue.c,
920         * src/pic16/ralloc.h,
921         * src/pic16/ralloc.cc: prefixed IS_CONFIG_ADDRESS with PIC16_
922         to fix conflict with pic port
923
924 2004-05-28 Vangelis Rokas <vrokas AT otenet.gr>
925
926         * src/pic16/glue.c (pic16emitStaticSeg): do not print as publics or
927         externs configuration variables,
928         * src/pic16/ralloc.h,
929         * src/pic16/ralloc.cc: IS_CONFIG_ADDRESS is made public and added
930         prototype in header, commented out some debug messages
931
932 2004-05-26 Vangelis Rokas <vrokas AT otenet.gr>
933
934         * src/pic16/glue.c,
935         * src/pic16/main.c,
936         * src/pic16/pcode.c: added gpasm directives #FILE/#LINE
937         for gpasm COFF object generation. Thanks to D. Hawkins for
938         his patch info
939
940 2004-05-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
941
942         * src/ds390/main.c,
943         * src/mcs51/main.c: fixed sort order of mnemonics (thanks to Maarten
944         Brock for spotting this)
945         * src/ds390/gen.c (genEndFunction),
946         * src/mcs51/gen.c (genEndFunction): always save psw if function is an
947         interrupt handler and critical. Disable push/pop optimizations when
948         peephole optimizations disabled.
949
950 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
951
952         Updated pic16 library sources and headers.
953         * device/lib/pic16/pic18f*/ ,
954         * device/include/pic16/*.h: modified to handle structured SFR
955         definitions
956
957 2004-05-25 Vangelis Rokas <vrokas AT otenet.gr>
958
959         * src/port.h (PORT structure): added hook initPaths, now each
960         port can declare its own default search paths,
961         which can been seen with the --print-search-dirs option,
962         see pic16 port for example,
963         * src/SDCCmain.c (setBinPaths, setIncludePaths, setLibPath,
964         setDataPaths): test to options.printSearchDirs is ifdef'ed out,
965         * (doPrintSearchDirs): NEW, replaces in a central manner the
966         printing of search dirs which was split in set*Paths functions,
967         * (main): added call to port->initPaths and doPrintSearchDirs,
968         * src/avr/main.c,
969         * src/ds390/main.c,
970         * src/hc08/main.c,
971         * src/izt/i186.c,
972         * src/izt/tlcs900h.c,
973         * src/mcs51/main.c,
974         * src/pic/main.c,
975         * src/pic16/main.c: modified port structures to reflect addition of
976         initPaths hook,
977
978         * src/pic16/device.c (regCompare): registers are finally sorted by name,
979         * (pic16_dump_section): for registers in same address reserve memory once,
980         * src/pic16/device.h (struct PIC16_device): changed variable gen_banksel
981         to no_banksel,
982         * src/pic16/genarith.c (pic16_genPlus): added code to handle cases where
983         result is greater in size than right or left,
984         * (pic16_genUMult8X8_8): there are some cases where the result can
985         be 16 bits size, so handle these,
986         * src/pic16/gen.c: changed some pic16_emitpcomment to DEBUGpic16_emitcode,
987         * (pic16_outBitC): modified to emit pcodes,
988         * (pic16_storeForReturn): using is_LitOp to see if operand is literal
989         or not,
990         * (genDivOneByte): implemented algorithm to divide 8-bits,
991         * (genCmp): uncommented goto, but issues still exist,
992         * (genAnd): fixed a bug with variables >8bits,
993         * (genPackBits): optimization added that uses BCF/BSF to change a
994         single bit,
995         * (genAssign): fixed bug when assigning floating point literals,
996         * src/pic16/glue.c (pic16glue): added assembler directive 'code' before
997         __sdcc_gsinit_startup label,
998         * src/pic16/main.c (_pic16_init): removed search directory
999         initialisations,
1000         * (_pic16_initPaths): NEW, used to initialise search directories,
1001         * (_hasNativeMulFor): support functions for all except char/int
1002         multiplication, and char division,
1003         * (PIC16_port struct): modified entry for native mul support,
1004         * src/pic16/pcode.c (insertBankSwitch): modified to support the renamed
1005         no_banksel option,
1006         * (buildCallTree): call to register_usage is ifdef'ed out,
1007
1008 2004-05-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1009
1010         * device/include/string.h: applied Stas Sergeev's patch to make this
1011         header file compatible with the preprocessor -Wundef option
1012         * src/SDCCmain.c (main): abort compilation if preprocessor reports
1013         failure (fixes bug #941458)
1014
1015 2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1016
1017         * src/SDCCopt.c (killDeadCode): fixed bug #907733
1018         * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
1019         that the variable, not the function, should be static
1020         * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
1021         to be consistent with non-literal case
1022
1023 2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1024
1025         * src/SDCCast.c (isConformingBody): fixed bug #949967
1026         * src/SDCCopt.c (cnvToFcall, cnvToFloatCast, cnvFromFloatCast,
1027         convilong): fixed bug #952086
1028
1029 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1030
1031         * src/SDCCmem.c (allocVariables): fixed bug #955321
1032
1033 2004-05-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1034
1035         * src/hc08/main.c (_hc08_genAssemblerEnd),
1036         * src/SDCCdwarf2.c (dwOpenFile, dwCloseFile, dwWriteFunction,
1037         dwWriteModule, dwWriteCLine, dwWriteALine, dwarf2FinalizeFile):
1038         completely eliminated the use of a temporary file
1039         * src/SDCCdwarf2.c (dwWriteAttr): fixed bug with location list offset
1040         when more than one file linked
1041         * src/SDCCloop.c (pointerAssigned): fixed bug #954163
1042
1043 2004-05-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1044
1045         * src/SDCCval.c (valForArray): applied Maarten Brock's patch #947682
1046         which fixes bug #543481
1047         * support/regression/tests/bug-751703.c: fixed comments left from a
1048         cut and paste error
1049         * src/SDCCdwarf2.c (dwCloseFile): don't explicitly close a temp file
1050         * src/SDCCdwarf2.c (dwTagFromType): added bitfield support
1051         * src/SDCCdwarf2.c (dwWriteSymbolInternal): handle extern within local
1052         scopes
1053         * src/SDCCdwarf2.c (dwWriteLineNumber): line number deltas are signed
1054         * src/SDCCmain.c (processFile, parseCmdLine): non-alphanumeric chars
1055         are now changed to underscores in moduleName
1056
1057 2004-05-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1058
1059         * as/mcs51/lkmem.c: better fix for bug #954173
1060
1061 2004-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
1062         committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1063
1064         * device/include/c8051f020.h: newly added SiLabs (Cygnal) header file
1065         * device/include/c8051f000.h,
1066         * device/include/c8051f120.h,
1067         * device/include/c8051f300.h,
1068         * device/include/c8051f310.h,
1069         * device/include/c8051f320.h: updated (added _XPAGE, CAPN, CAPP,
1070         PWM16) and detab'ed
1071
1072 2004-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1073
1074         * doc/sdccman.lyx: mentioned sourceforge's delay between web frontend
1075         and mailing lists, doc'ed --no-peep-comments, removed reference
1076         to knoppix (newest version has no LyX/LaTeX), other minor changes
1077         * src/SDCCglue.c (glue): save 2 bytes stack space with
1078         option --main-return. The ljmp could probably be avoided too
1079
1080 2004-05-14 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1081
1082         * as/mcs51/lkmem.c, as/mcs51/lkaomf51: fixed bug 954173
1083
1084 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1085
1086         * src/SDCCsymt.h: added IS_AUTO(symbol) test macro
1087         * src/SDCCopt.c (isLocalWithoutDef),
1088         * src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
1089         which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
1090         (credit to Maarten Brock for patch #949363, on which this is based)
1091         * support/regression/tests/bug-751703.c: some test cases of extern used
1092         within inner scopes.
1093
1094 2004-05-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1095
1096         * src/SDCCdwarf2.c (dwMatchTypes): structs must have matching
1097         SPEC_STRUCT
1098         * src/SDCCdwarf2.c (dwTagFromType): fix to handle recursive
1099         struct definitions
1100         * src/SDCCdwarf2.c (dwWriteModule, dwNewDebugSymbol, dwWriteEndFunction,
1101         dwWriteLabel): fix to create valid debugger symbols even when
1102         the module name has non-alphanumeric symbols in it
1103         * src/SDCCdwarf2.c (dwWriteSymbolInternal): better detection for
1104         when a variable's allocation has been optimized away
1105
1106
1107 2004-05-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1108
1109         * src/hc08/gen.c (hc08_emitDebuggerSymbol),
1110         * src/hc08/main.c,
1111         * src/mcs51/gen.c (mcs51_emitDebuggerSymbol),
1112         * src/mcs51/main.c,
1113         * src/ds390/gen.c (ds390_emitDebuggerSymbol),
1114         * src/ds390/main.c,
1115         * src/z80/gen.c (z80_emitDebuggerSymbol),
1116         * src/z80/main.c,
1117         * src/pic/gen.c (pic14_emitDebuggerSymbol),
1118         * src/pic/main.c,
1119         * src/pic16/gen.c (pic14_emitDebuggerSymbol),
1120         * src/pic16/main.c,
1121         * src/avr/gen.c (avr_emitDebuggerSymbol),
1122         * src/avr/main.c,
1123         * src/xa51/gen.c (xa51_emitDebuggerSymbol),
1124         * src/xa51/main.c,
1125         * src/SDCCdebug.c (emitDebuggerSymbol),
1126         * src/SDCCdebug.h,
1127         * src/port.h: added a debugger struct to the port struct. Added a
1128         callback for defining debugger symbols
1129
1130         * src/SDCCast.c (createLabel),
1131         * src/SDCC.y (labeled_statement): mark all compiler generated labels
1132         with isitmp = 1
1133         * src/SDCCicode.h,
1134         * src/SDCCicode.c (geniCodeFunctionBody): added a link from the FUNCTION
1135         iCode back to the ast for the function
1136
1137         * src/hc08/ralloc.c (hc08_assignRegisters),
1138         * src/hc08/ralloc.h: define a regs struct for the stack pointer. Removed
1139         unneeded fields from the regs struct.
1140         * src/hc08/gen.c (transferRegReg, genFunction, genEndFunction): use the
1141         pushReg() & pullReg() functions instead of emitcode()
1142
1143         * src/hc08/gen.c (genLabel, genhc08Code),
1144         * src/SDCCdebug.h: Added additional debugger hooks needed for DWARF
1145
1146         * src/cdbFile.c (cdbWriteLabel, cdbWriteScope): Added stubs for unneeded
1147         debugger hooks
1148
1149         * src/hc08/gen.c (genEndFunction, genhc08Code),
1150         * src/hc08/gen.h,
1151         * src/mcs51/gen.c (genEndFunction, gen51Code),
1152         * src/mcs51/gen.h,
1153         * src/ds390/gen.c (genEndFunction, gen390Code),
1154         * src/ds390/gen.h,
1155         * src/z80/gen.c (genEndFunction, genZ80Code),
1156         * src/z80/gen.h,
1157         * src/z80/z80.h,
1158         * src/pic/gen.c (genEndFunction, genpic14Code),
1159         * src/pic/gen.h,
1160         * src/pic16/gen.c (genEndFunction, genpic16Code),
1161         * src/pic16/gen.h,
1162         * src/avr/gen.c (genEndFunction, genAVRCode),
1163         * src/avr/gen.h,
1164         * src/xa51/gen.c (genEndFunction, genXA51Code),
1165         * src/xa51/gen.h,
1166         * src/cdbFile.c (cdbWriteFunction, cdbWriteEndFunction): moved cdb
1167         specific code to cdbFile.c and out of the backend code generators
1168
1169         * as/hc08/lkmain.c (main): removed OMF51 support from link-hc08
1170         * as/hc08/lkarea.c (lnkarea): areas with NOLOAD attribute default
1171         starting address is now 0
1172
1173         * as/hc08/asm.h,
1174         * as/hc08/m08pst.c,
1175         * as/hc08/asmain.c (asmbl): implemented the .sleb128 and .uleb128
1176         assembler directive for DWARF support
1177         * as/hc08/lkelf.c (elf): only increment address when rtflg[] set
1178
1179         * src/src.dsp,
1180         * src/Makefile.in,
1181         * src/SDCCdwarf2.c: preliminary DWARF (ver 2) debugger data generator
1182
1183 2004-05-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1184
1185         * src/hc08/gen.c (genJumpTab, emitcode, genhc08code): fixed stack error
1186         and inappropriate peephole optimization in jump tables
1187
1188 2004-04-30 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1189
1190         * as/hc08/m08pst.c,
1191         * src/SDCCglue.c: sdccopt works for the hc08 port now
1192
1193 2004-04-27 Bernhard Held <bernhard AT bernhardheld.de>
1194
1195         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): fixed bug #942130
1196
1197 2004-04-27 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1198
1199         * as/hc08/lkelf.c: sdccconf.h is not available in WIN32
1200
1201 2004-04-24 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1202
1203         * src/SDCCpeeph.c (replaceRule): support empty replacement peephole
1204         rules
1205         * src/SDCCmain.c,
1206         * src/SDCCglobl.h,
1207         * src/SDCCpeeph.c (getPeepLine): new option --no-peep-comments omits
1208         comments from the peephole optimizer replacement rules
1209         * src/SDCCmem.c (printAllocInfoSeg): give actual location of spilled
1210         symbols
1211         * src/SDCCcse.c (updateSpillLocation),
1212         * src/SDCCopt.c (killDeadCode, findReqv): better tracking of register
1213         equivalents
1214         * src/hc08/ralloc.c (regTypeNum): pseudo symbols must be in DATA only
1215         * src/hc08/main.c (_hc08_finaliseOptions): made pointers to stack
1216         objects far pointers
1217
1218 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1219
1220         * src/SDCCsymt.h: a missing part of my last change
1221         * src/pic/ralloc.c (regTypeNum),
1222         * src/pic16/ralloc.c (regTypeNum): fixed statement/declaration order
1223
1224 2004-04-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1225
1226         * src/SDCCicode.h,
1227         * src/SDCCicode.c (aggrToPtrDclType),
1228         * src/SDCCptropt.h,
1229         * src/SDCCptropt.c (ptrBaseRematSym, ptrPseudoSymSafe,
1230         ptrPseudoSymConvert),
1231         * src/pic/ralloc.c (regTypeNum),
1232         * src/pic16/ralloc.c (regTypeNum),
1233         * src/hc08/ralloc.c (regTypeNum),
1234         * src/ds390/ralloc.c (regTypeNum),
1235         * src/mcs51/ralloc.c (regTypeNum): check for dependancy hazards before
1236         creating pseudo symbols (fixed bugs #777768, #930484, and #933966)
1237
1238 2004-04-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1239
1240         * link/z80/lkmain.c (afile),
1241         * as/hc08/lkmain.c (afile),
1242         * as/mcs51/lkmain.c (afile): fix suggested by Maarten Brock to
1243         prevent a pointer problem when a filename has no directory and
1244         no extension specified.
1245
1246 2004-04-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1247
1248         * link/z80/lkmain.c (afile): allow periods in directory names
1249         * link/z80/lkmain.c (afile),
1250         * as/mcs51/lkmain.c (afile),
1251         * as/hc08/lkmain.c (afile): allow linker script file to have an
1252         extension other than ".lnk"
1253         * link/z80/lklex.c (getfid),
1254         * link/z80/lkmain.c (parse),
1255         * as/mcs51/lklex.c (getfid),
1256         * as/mcs51/lkmain.c (parse),
1257         * as/hc08/lklex.c (getfid),
1258         * as/hc08/lkmain.c (parse): Support comments in the linker script
1259         file on lines by themselves and after filenames
1260
1261 2004-04-20 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1262
1263         * as/link_hc08.dsp: Added as/hc08/lkelf.c to project.
1264
1265 2004-04-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1266
1267         * src/z80/peeph-z80.def: removed some peephole rules that don't
1268         work with multibyte arithmetic (fixed bug #937126)
1269         * src/mcs51/peeph.def: fixed peephole rules 150-158 to apply only
1270         to registers and not global variables
1271         * src/SDCCicode.c (geniCodeAssign, ast2iCode, geniCodePostInc,
1272         geniCodePreInc, geniCodePostDec, geniCodePreDec,
1273         geniCodeLogicAndOr, geniCodeConditional): enforce strict lvalue
1274         checking for assignments not internally generated (fixed bug #931895)
1275         * src/SDCC.y (postfix_expr): ignore typedefs when looking for a
1276         structure member (fixed bug #930072)
1277
1278 2004-04-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1279
1280         * src/SDCCmain.c (linkEdit),
1281         * src/hc08/main.c (_hc08_parseOptions),
1282         * as/hc08/Makefile.in,
1283         * as/hc08/aslink.h,
1284         * as/hc08/asm.h,
1285         * as/hc08/m08pst.c,
1286         * as/hc08/lkrloc.c (relr, rele),
1287         * as/hc08/lkarea.c (lnkarea)
1288         * as/hc08/lkmain.c (afile, parse),
1289         * as/hc08/lkelf.c: support for ELF output
1290         * as/hc08/lks19.c (s19),
1291         * as/hc08/lkihx.c (ihx): ignore areas with the NOLOAD attribute
1292
1293 2004-04-17 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1294
1295         * as/mcs51/lkihx.c: Fixed bug #899105.
1296
1297 2004-04-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1298
1299         * doc/sdccman.lyx: Added instructons on how to convert MSVC .dsw and
1300         .dsp files from Unix to DOS.
1301
1302 2004-04-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1303
1304         * doc/sdccman.lyx: removed the ANSI-C noncompliance note regarding
1305         function pointers; we have been compliant for several months now.
1306         * src/mcs51/ralloc.c (serialRegAssign): enabled part of my 2004-04-13
1307         change that was accidently commented out
1308         * src/mcs51/gen.c (freeAsmop, getFreePtr, freeForBranchAsmop, genIfxJump,
1309         genCmpEq, jmpTrueOrFalse, genCmp, genAnd, genOr, genXor, genIfx): fixed
1310         bug #922319
1311
1312 2004-04-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1313
1314         * src/hc08/gen.c: output of all of the internal debugging information
1315         is now controlled by the D() macro; it is disabled by default
1316
1317 2004-04-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1318
1319         * src/mcs51/ralloc.c (serialRegAssign, fillGaps, allocThisReg): try
1320         harder to keep the same registers during a CAST iCode
1321         * src/SDCCopt.c (optimizeCastCast, eBBlockFromiCode): casts of char to
1322         long via int can be done in a single cast, if the signedness is
1323         correct.
1324         * support/regression/tests/bug-927659.c: fixed to avoid conflict with
1325         putchar() in tinibios.c in ds390's library
1326
1327 2004-04-12 Bernhard Held <bernhard AT bernhardheld.de>
1328
1329         * src/SDCCast.c (decorateType): fixed bug #898889,
1330         cast result of a literal complement too
1331         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #930931,
1332         fixed check for bitfields
1333
1334 2004-04-11 Bernhard Held <bernhard AT bernhardheld.de>
1335
1336         * src/SDCCicode.c (geniCodeLogic): made it static,
1337         (geniCodeLogicAndOr): added in order to fix bug #905492,
1338         (ast2iCode): fixed bug #905492
1339         * support/regression/tests/bug-905492.c: added
1340         * src/SDCCast.c (decorateType): don't decorate/process parms twice,
1341         (processParms): fixed bug #927659: don't copy parms, this will clear
1342         decorated flag
1343         * support/regression/tests/bug-927659.c: added
1344
1345 2004-03-29 Bernhard Held <bernhard AT bernhardheld.de>
1346
1347         * src/SDCCast.c (addCast): don't cast float to char
1348         * device/lib/libsdcc.lib: added _memmove
1349
1350 2004-03-28 Bernhard Held <bernhard AT bernhardheld.de>
1351
1352         * device/lib/large/Makefile: fixed parallel execution by
1353         replacing `make` by `$(MAKE)`
1354
1355 2004-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1356
1357         * src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
1358         offsets (fixes bug #923936)
1359
1360 2004-03-26 Bernhard Held <bernhard AT bernhardheld.de>
1361
1362         * device/lib/small/Makefile: fixed parallel execution by
1363         replacing `make` by `$(MAKE)`
1364
1365 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
1366
1367         * device/lib/vprintf.c (vsprintf): minor optimization, see bug #801101
1368
1369 2004-03-23  Scott Dattalo  <scott AT dattalo.com>
1370
1371         * src/pic/gen.c (genCpl): multi-byte complements were not working.
1372         * src/regression/Makefile: Regression test was not running.
1373
1374 2004-03-23 Bernhard Held <bernhard AT bernhardheld.de>
1375
1376         * src/SDCCast.c (resultTypePropagate, decorateType): avoid promotion to int for
1377         complement if possible
1378         * src/SDCCval.c (valComplement),
1379         * src/SDCCicode.c (operandOperation): fixed complement of literal
1380         * support/regression/tests/onebyte.c (testComplement): added
1381
1382 2004-03-22 Bernhard Held <bernhard AT bernhardheld.de>
1383
1384         * src/SDCCast.c (processParms): fixed bug #920866; decorateType() can
1385         return an optimized tree; actually replace actParm with the new tree
1386         * src/SDCCast.h: added some parantheses to remove side effects
1387         * support/regression/tests/bug-920866.c
1388
1389 2004-03-21  Scott Dattalo  <scott AT dattalo.com>
1390         * src/pic/gen.c, src/pic/gen.h, src/pic/genarith.c, src/pic/pcode.c:
1391         Bit operands were not being handled properly in the pic14 port.
1392         (now src/regression/add.c passes again).
1393
1394 2004-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1395
1396         * src/SDCC.y (labeled_statement): case and default no longer require
1397         a following statement (RFE #893037)
1398
1399 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1400
1401         * src/mcs51/gen.c (pushSide, genSignedRightShift, genDjnz, geniPush):
1402         use MOVA macro to avoid "mov a,acc" when peephole optimizer is
1403         disabled (fixes bug #916294)
1404         * sim/ucsim/s51.src/mov.cc (inst_mov_a_addr): Throw an error on
1405         "mov a,acc"; patch provided by Lenny Story
1406         * device/include/mc68hc908gp32.h: header contibuted by Juan Gonzalez
1407
1408 2004-03-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1409
1410         * src/mcs51/gen.c (genFunction): optimize RECEIVE in reentrant
1411         functions
1412         * src/ds390/gen.c (genFunction, genEndFunction),
1413         * src/ds390/ralloc.c (ds390_assignRegisters),
1414         * src/mcs51/gen.c (genFunction, genEndFunction, mcs51_assignRegisters):
1415         * src/mcs51/ralloc.c (mcs51_assignRegisters): Skip optimizing registers
1416         pushed if there are parameters passed on the stack. Also, a cleaner
1417         way to decide if r0/r1 should be pushed/popped. (Together they fix
1418         bug #918693)
1419
1420 2004-03-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1421
1422         * doc/sdccman.lyx,
1423         * device/lib/mcs51/crtpagesfr.asm,
1424         * device/lib/mcs51/crtxinit.asm,
1425         * device/lib/mcs51/crtxstack.asm: Changed name of _PAGESFR to _XPAGE
1426         to avoid confusion with Si Lab's SFRPAGE register.
1427
1428 2004-03-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1429
1430         * src/SDCCglue.c (emitMaps): allow public sfr variables
1431         * src/SDCCglue.c (initialComments): include compiler build date
1432         with compiler version and put the timestamp of the generated
1433         assembly file on a serperate line to be less confusing.
1434         * src/port.h: added genInitStartup hook
1435         * src/avr/main.c,
1436         * src/ds390/main.c,
1437         * src/hc08/main.c,
1438         * src/pic/main.c,
1439         * src/pic16/main.c,
1440         * src/xa51/main.c,
1441         * src/z80/main.c: genInitStartup initialize as NULL (default to
1442         historical behaviour)
1443         * src/SDCCglue.c (glue): _sdcc_gsinit_startup is now port specific.
1444         * src/mcs51/main.c: (_mcs51_genInitStartup, _mcs51_genExtraAreas,
1445         _mcs51_genXINIT, _mcs51_genRAMCLEAR): link initialization code from the
1446         library instead of hard coding it into the compiler.
1447         * support/regression/ports/mcs51-stack-auto/spec.mk,
1448         * src/SDCCmain.c (linkEdit): added mcs51.lib to the link libraries
1449         * device/lib/mcs51/Makefile,
1450         * device/lib/small/Makefile,
1451         * device/lib/large/Makefile,
1452         * device/lib/mcs51/crtpagesfr.asm,
1453         * device/lib/mcs51/crtstart.asm,
1454         * device/lib/mcs51/crtxclear.asm,
1455         * device/lib/mcs51/crtxinit.asm,
1456         * device/lib/mcs51/crtclear.asm,
1457         * device/lib/mcs51/crtxstack.asm: move most of the mcs51 C runtime
1458         startup/initialization out of src/SDCCglue.c and src/mcs51/main.c
1459         and into user configurable files.
1460         * device/lib/clean.mk: clean mcs51 directory too
1461         * support/regression/tests/longlit.c: added static to T1 declaration
1462         * doc/sdccman.lyx: documented _PAGESFR sfr for customizing pdata
1463         accesses in the initialization code
1464
1465 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1466
1467         * device/include/mc68hc908qy.h: corrected declarations of FLBPR and
1468         OSCTRIMVAL as noted in bug #916008
1469
1470 2004-03-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1471
1472         * src/SDCCloop.c (basicInduction): fixed bug with loop induction
1473         in loops with multiple exits (reported as incorrect registers
1474         used by Martin Helmling in Sdcc-user list)
1475
1476 2004-03-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1477
1478         * src/ds390/main.c (_ds390_genAssemblerPreamble): cosmetic change,
1479         made ds390 register extensions look less like error messages
1480
1481 2004-03-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1482
1483         * src/SDCCglue.c (printIvalPtr): fixed bug with pointer initializer
1484         reported by Adam Wozniak in Sdcc-user list
1485
1486 2004-03-10 Bernhard Held <bernhard AT bernhardheld.de>
1487
1488         * src/SDCCast.c (decorateType): fixed with bug and promotion in
1489         arithmetic optimizations, added debug output
1490
1491 2004-03-09 Bernhard Held <bernhard AT bernhardheld.de>
1492
1493         * device/lib/time.c (mktime): fixed bug reported by Bert Thomas
1494         * sdcc.spec: updated and split sdcc into 3 rpms
1495         * src/SDCCast.c (decorateType): &|^ don't need addCast(); addCast() is
1496         needed for literals of LEFT_OP and '+'
1497         * src/SDCCicode.c (geniCodeLogic): I must have been braindead when I
1498         introduced RESULT_TYPE_NOPROM
1499         (geniCodeMultiply): fixed logic for decision if mul is optimized to
1500         left shift
1501         * src/SDCCsymt.c (computeType): op is int; added RESULT_TYPE_OTHER;
1502         limited promotion to int only for '*'
1503         * src/SDCCsymt.h (computeType): op is int, removed RESULT_TYPE_NOPROM
1504
1505 2004-03-09 Hans Dorn <hjdorn AT users.sourceforge.net>
1506
1507         * src/pic16/gen.c (genSkip),
1508         (genc16bit2lit), (gencjneshort): commented out
1509         (is_LitOp): new helper function, checks operand type
1510         (genCmpEq): rewritten
1511
1512 2004-03-08 Bernhard Held <bernhard AT bernhardheld.de>
1513
1514         * support/regression/tests/bug-908454.c: added
1515
1516 2004-03-07 Bernhard Held <bernhard AT bernhardheld.de>
1517
1518         * src/SDCCast.c (addCast): fixed bug #908454 by promoting bits to char
1519         * src/SDCCicode.c (usualBinaryConversions): op needs int type
1520         (geniCodeCast): cosmetic, don't preserve bit storage class
1521         (geniCodeLeftShift): added promotion
1522         (geniCodeLogic): fixed regression
1523         * src/SDCCsymt.c (computeTypeOr): accept bits too
1524         (compareType): 2nd part of fix for bug #908454, needed for bitfields
1525
1526 2004-03-07  Borut Razem <borut.razem AT siol.net>
1527
1528         * support/Util/findme.c: alloca() replaced with malloc()/free() pair
1529
1530 2004-03-06 Vangelis Rokas <vrokas AT otenet.gr>
1531
1532         * src/pic16/ralloc.c (pic16_genPackRegisters): reverted to old
1533         version of pic16_genPackRegisters which does not check if ic is a
1534         CAST operator,
1535         * src/pic16/gen.c (ifxForOp): disabled new and untested code in
1536         function cause string1.c regression test fails
1537
1538 2004-03-06 Bernhard Held <bernhard AT bernhardheld.de>
1539
1540         * sim/ucsim/configure.in,
1541         * sim/ucsim/configure,
1542         * sim/ucsim/doc/Makefile.in: use docdir
1543         * src/SDCC.y: fixed sbit atrributes
1544         * src/SDCCast.c (getResultTypeFromType): added support for bitfields
1545         * src/SDCCast.c (decorateType): |^& need special promotion handling
1546         * src/SDCCast.h,
1547         * src/SDCCsymt.h: moved definition of RESULT_TYPE
1548         * src/SDCCsymt.h (computeType),
1549         * src/SDCCicode.c: computeType() needs op
1550         * src/SDCCsymt.c (checkTypeSanity),
1551         * doc/sddman.lyx: "plain" bitfields are unsigned
1552         * src/SDCCsymt.c (computeTypeOr): added
1553         * src/SDCCsymt.c (computeType): added support for bitfields, fixed
1554         |^& ops
1555         * src/SDCCval.c (val*): computeType() needs op
1556         * src/SDCCval.c (valCastLiteral): fixed casting of bitfields
1557         * support/regression/tests/onebyte.c: added tests for |^&
1558
1559 2004-03-06 Hans Dorn <hjdorn AT users.sourceforge.net>
1560
1561         * src/pic16/gen.c: (genpic16Code) use copy of printILine's output
1562         for writing icode into asm output.
1563
1564 2004-03-05 Vangelis Rokas <vrokas AT otenet.gr>
1565
1566         * src/pic16/device.c: added some debug lines enabled
1567         with macro DEBUG_CHECK,
1568         * src/pic16/genarith.c: more debug in genPlus,
1569         * (pic16_genUMult8XLit_16, pic16_genUMult8X8_16): removed,
1570         * (pic16_genUMult16X16_16, pic16_genUMult16XLit_16): NEW,
1571         * src/pic16/gen.c: added prototypes for pic16_genMult16X16_16,
1572         * (aopForSym): onStack symbols are re-placed in data memspace,
1573         and onStack flag is cleared,
1574         * (pic16_popGetTempReg, pic16_popReleaseTempReg): modified to
1575         copy temporary pcodeop,
1576         * (genPcall): added warning for not updating PCLATU,
1577         * (genFunction): removed test with IFFUNC_CALLEESAVES, its
1578         always true for pic16 port,
1579         * (genMultOneWord): NEW, supports integer multiplication,
1580         * (genMult): modified to call genMultOneWord,
1581         * (ifxForOp): added warning when return NULL,
1582         * src/pic16/glue.c (pic16emitRegularMap): symbol implicit
1583         flag is set before call to operandFromSymbol for implicit
1584         added structures,
1585         * src/pic16/main.c (_pic16_finaliseOptions): options.float_rent,
1586         options.intlong_rent are set by default,
1587         * (_hasNativeMulFor): modified to allow port generation of integer
1588         multiplication,
1589         * src/pic16/ralloc.c (pic16_allocDirReg): commented out line which
1590         set regtype to REG_SFR for all registers, restricting seting the
1591         accessBank flag for registers 0<= r < 0x80 and 0xf80<=r<=0xfff,
1592
1593 2004-03-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1594
1595         * src/mcs51/peephole.def: added 251.b and 253.x. 253.x are applied
1596         more than 500 times in the regression tests
1597
1598 2004-03-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1599
1600         * support/Util/SDCCerr.h,
1601         * support/Util/SDCCerr.c,
1602         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
1603         enumerator_list),
1604         * src/SDCCsymt.c (addSymChain): show location of oriignal definition
1605         for symbol conflicts.
1606         * support/valdiags/tests/enum.c,
1607         * support/valdiags/tests/tentdecl.c,
1608         * support/valdiags/tests/struct.c: expect possible error messages
1609         referring to original symbol definitions.
1610         * src/SDCC.y (struct_or_union_specifier, struct_declarator),
1611         * src/SDCCsymt.h,
1612         * src/SDCCsymt.c (promoteAnonStructs): support anonymous struct/union
1613
1614 2004-03-03 Hans Dorn <hjdorn AT users.sourceforge.net>
1615
1616         * src/pic16/gen.c (gencjne): fixed for right=REG / left=LIT
1617
1618 2004-02-03 Vangelis Rokas <vrokas AT otenet.gr>
1619
1620         * src/pic16/ralloc.c (newReg): fixed bug #908929
1621
1622 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1623
1624         * src/ds390/gen.c: added missing #include "main.h"
1625
1626 2004-03-02 Vangelis Rokas <vrokas AT otenet.gr>
1627
1628         * src/pic16/device.c (checkAddSym): NEW, adds a symbol to set while
1629         checking if symbol is already in set,
1630         * src/pic16/device.h: prototype for checkAddSym,
1631         * src/pic16/gen.c: (_G): added entry interruptvector,
1632         * (assignResultValue): removed some commented out lines,
1633         * (genFunction): check for ISR via sym->type, absolute section for
1634         interrupt code is created via a new pBlock, the goto instruction is
1635         placed now correctly at the interrupt vector position, changed all
1636         references from ivec to _G.interruptvector,
1637         * WREG,STATUS,BSR are not saved in stack upon an entry to interrupt
1638         is the interrupt is a high priority one, same for return from ISR,
1639         * src/pic16/glue.c: changed all calls of addSetHead for publics and
1640         externs to calls of checkAddSym,
1641         * src/pic16/pcode.c (pic16_pBlockConvert2*): emit warning when
1642         pic16_pcode_verbose flag is set,
1643         * src/pic16/pcode.h: extern to pic16_pcode_verbose,
1644         * src/pic16/pcoderegs.c: message about how many registers are saved
1645         will only be emitted if pic16_pcode_verbose flag is set,
1646
1647 2004-03-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1648
1649         * src/ds390/ralloc.h,
1650         * src/ds390/ralloc.c (ds390_regWithIdx),
1651         * src/ds390/gen.c (emitcode),
1652         * src/ds390/main.h,
1653         * src/ds390/main.c (instructionSize, ds390newAsmLineNode, updateOpRW,
1654         ds390opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
1655         ds390operandCompare, getRegsRead, getRegsWritten,
1656         initializeAsmLineNode): customized instruction size calculation for
1657         ds390, started basis for some register optimizations
1658         * src/ds390/gen.c (gen390Code, emitcode): associate iCodes with
1659         corresponding assembly output
1660         * src/ds390/gen.c (genFunction, genEndFunction): added case to handle
1661         missing push/pop of r0/r1. Optimized push/pops
1662
1663 2004-03-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1664
1665         * src/mcs51/main.c (instructionSize): fixed ACALL size
1666         * src/mcs51/main.c (updateOpRW): fixed bug with @dptr, @a+dptr operands
1667
1668 2004-03-01 Vangelis Rokas <vrokas AT otenet.gr>
1669
1670         * src/pic16/device.c (pic16_dump_section): fixed a bug that allowed
1671         the sorting of rlist with NULL elements
1672         * (print_idataType, print_idata): NEW to create idata sections
1673         * src/pic16/device.h: idataSymSet new variable
1674         * src/pic16/gen.c (genFunction): fixed some bugs in string
1675         comparing, improved the absolute section creation for ISRs,
1676         added FSR0L/FSR0H in registers that are saved in an ISR,
1677         * (genInline): fixed the processing of inline snippets,
1678         now they undergo no process by the peephole optimizer
1679         * src/pic16/glue.c (pic16emitRegularMap): symbols with initialiser
1680         are placed in idataSymSet,
1681         * (pic16emitStaticSeg): extern symbols are added in externs,
1682         * src/pic16/ralloc.c (pic16_allocDirReg): work around to reduce bank
1683         switching when aboslute variables are placed in access bank memory
1684         * (pic16_writeUsedRegs): added call to pic16_dump_idata,
1685         * (packRegsForSupport,packRegsForAccUse,packRegsForOneuse):
1686         commented out with #if,
1687         * (pic16_packRegisters): reintroduce the check for CAST because some
1688         symbols are not correctly handled,
1689         * src/pic16/pcode.h: changed the definition of pCodeAsmDir to hold a
1690         pCodeInstruction instead of pCode,
1691         * src/pic16/pcode.c (pic16_newpCodeAsmDir): modified for the new
1692         pCodeAsmDir definition,
1693         * (pic16_pCode2str, genericPrint): when an AsmDir pcode has a NULL
1694         directive, then the argument directive is emitted without the leading
1695         tab, hack for inline labels which must be in the first column,
1696         * (compareLabel,pic16_findNextInstruction),
1697         * (pic16_findPrevInstruction): added case for PO_ASMDIR,
1698         * (insertBankSwitch): modified for the new pCodeAsmDir,
1699
1700 2004-03-01 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
1701         patch applied by Vangelis Rokas <vrokas AT otenet.gr>
1702
1703         * src/pic16/gen.c (pic16_popGet): case PO_DIR, adds the offset to
1704         instance,
1705         * (pushSide): commented out with #if,
1706         * (assignResultValue): fixed some typos in saving
1707         registers,
1708         * (genPcall): FIXED and sync'ed with genCall,
1709         * (genDataPointerGet,genDataPointerSet): using offset not leoffset
1710         * (genNearPointerGet): fixed to handle some more cases,
1711         implementation scheme via table reads,
1712         * (genConstPointerGet): modified to access code memory correct,
1713         * (genCodePointerGet,genNearPointerSet,genGenPointerSet): modified
1714         and improved to handle some cases
1715         * glue.c (printIvalType,printIvalChar,emitStaticSeg): use "DB"
1716         instead of "RETLW" for init data
1717         * src/pic16/ralloc.c (pic16_allocDirReg): warning when a symbol is
1718         not IN_DIRSPACE, work around to reduce bank switching when aboslute
1719         variables are placed in access bank memory (<0x80 and >=0xf80),
1720         * src/pic16/pcode.c: added SFRs TBLPTR, TABLAT, added opcodes TBLRD,
1721         TBLRD_POSTINC,TBLRD_POSTDEC,TBLRD_PREINC,TBLWT,TBLWT_POSTINC,
1722         TBLWT_POSTDEC,TBLWT_PREINC
1723         * Fixed initialisation of BSR, set "alias" for SSAVE to "0"
1724         * (pic16_emitDB,pic16_flushDB): New functions to generate "DB"
1725         directives
1726         * (pic16_pCodeConstString): use "DB" instead of "RETLW"
1727         * src/pic16/pcode.h: added TBLRD*,TBLWT*, added pic16_emitDB,
1728         pic16_flushDB, made pic16_newpCodeAsmDir public, added TBLPTR, TABLAT
1729         * src/pic16/ralloc.h: added IDX_BSR,IDX_TBLPTR*,IDX_TABLAT
1730
1731 2004-02-29  Borut Razem <borut.razem AT siol.net>
1732
1733         * src/Makefile.in, src/SDCCutil.c, support/Util/findme.c,
1734         support/Util/findme.h, support/Util/system.h: enhance binary relative
1735         search for lib and include by using findProgramPath()
1736
1737 2004-02-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1738
1739         * src/SDCCpeeph.h,
1740         * src/SDCCpeeph.c (pcDistance),
1741         * src/port.h,
1742         * src/mcs51/ralloc.h,
1743         * src/mcs51/ralloc.c (mcs51_regWithIdx),
1744         * src/mcs51/main.h,
1745         * src/mcs51/main.c (instructionSize, asmLineNode, updateOpRW,
1746         mcs51opcodeCompare, asmLineNodeFromLineNode, getInstructionSize,
1747         mcs51operandCompare, getRegsRead, getRegsWritten): made instruction
1748         size calculation port specific, started basis for some register
1749         optimizations
1750         * src/mcs51/gen.c (genFunction, genEndFunction): added case to handle
1751         missing push/pop of r0/r1. Optimized push/pops
1752         * src/mcs51/ralloc.c (packregisters): fixed bug #727095
1753         * device/lib/_modsint.c (_modsint),
1754         * device/lib/_modslong.c (_modslong): fixed sign of result in non-asm
1755         and stack version so regression tests pass
1756
1757 2004-02-26 Bernhard Held <bernhard AT bernhardheld.de>
1758
1759         * src/Makefile.in (dep): include SLIBOBJS in dependency check
1760         * src/SDCCast.c (decorateType): catch another small optimization
1761         with '?' operator
1762         * src/SDCCsymt.c (computeType): added comments and cosmetic changes
1763         * src/SDCCval.c (valMult, valDiv, valMod, valPlus, valMinus, valShift):
1764         modified to finally use computeType() all over SDCC,
1765         see Feature Request #877103
1766         * src/SDCCval.h: cosmetic
1767         * src/SDCCicode.c (operandOperation): fixed EQ_OP bug, now same as in
1768         valCompare(); regression tested in muldiv.c
1769         * support/regression/tests/muldiv.c (testMod): mod sign follows
1770         dividend only
1771
1772 2004-02-23 Bernhard Held <bernhard AT bernhardheld.de>
1773
1774         * src/SDCCast.c (decorateType): fixed bug #902362
1775         * doc/INSTALL.txt: fixed install instructions for win32
1776
1777 2004-02-21 Bernhard Held <bernhard AT bernhardheld.de>
1778
1779         * device/include/Makefile.in (install): fixed by replacing spaces
1780         by tabs
1781         * doc/README.txt,
1782         * doc/INSTALL.txt: updated for release
1783         * doc/sdccman.lyx: added warning for --xstack being buggy
1784
1785 2004-02-20 Bernhard Held <bernhard AT bernhardheld.de>
1786
1787         * src/pic16/ralloc.c (packRegsForAccUse):  disabled functions with #if
1788         to eliminate build warnings.
1789         * src/pic16/gen.c (pic16_popGet): fixed for gcc 2.95.4
1790
1791 2004-02-20 Vangelis Rokas <vrokas AT otenet.gr>
1792            Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
1793
1794         * doc/sdccman.lyx: removed PIC16 from PIC16 Port Specific Options,
1795         removed -penable-stack, added comment for stack pragma, added
1796         warning for not initializing the stack/frame registers, removed
1797         comment at interrupts section
1798
1799         Stack is made permanent, there is no ability to disable stack usage.
1800         * src/pic16/device.h,
1801         * src/pic16/device.c: removed all references to USE_STACK macro,
1802         * src/pic16/device.c (pic16_dump_section): when no elements in
1803         rlist, free rlist before return,
1804         * (pic16_dump_int_registers): NEW, internal registers are a new set
1805         of general purpose registers reused by each function,
1806         * (checkAddReg): returns 1 if registers is added to set,
1807         * (pic16_groupRegistersInSection): when a registers is of type
1808         PO_GPR_TEMP add it in pic16_int_regs and not in pic16_rel_udata,
1809         * src/pic16/device.h: memRange and Assigned Memory are deleted,
1810         SRCASECMP macro is moved here from device.c
1811         * src/pic16/genarith.c (pic16_pCodeOpType): added cases for
1812         PO_PCLATU, PO_PRODL, PO_PRODH,
1813         * (pic16_pCodeOpType, genMinus,
1814         changed compares to "a" register, with AOP_ACC,
1815         * (pic16_genPlus): fixed some bugs and indented properly,
1816         * (pic16_addSign): changed size to size+offset in the MOVWF
1817         instruction,
1818         * (pic16_genUMult8XLit_8): NEW, uses processor MULLW instruction to
1819         multiply 8-bit operand by literal, result is 8-bit,
1820         * (pic16_genUMult8X8_8): NEW, uses processor MULWF instruction to
1821         multiply 2 8-bit operand, result is 8-bit,
1822         * (pic16_genMult8X8_8): modified to call genUMult8X*_8 functions and not
1823         genUMult8X*_16,
1824         * src/pic16/gen.c: changed accUse to contain WREG only,
1825         * (pic16_emitcomment): renamed to pic16_emitpcomment,
1826         * (aopForSym): allocated dir register when IN_DIRSPACE(space) is,
1827         true, do not use immediate addressing any more unless sym is a
1828         pointer in codespace,
1829         * (aopForRemat): do not use immediate addressing when symbol not in
1830         codespace and when symbol's address is requested,
1831         * (aopOp): for-loop in if(sym->accUse) is modified for the new
1832         accUse size (= 1),
1833         * (aopGet): added case for AOP_ACC and don't return "accumulator
1834         bug" but WREG instead,
1835         * (popGetTempReg): pushes contents of temporary register in stack,
1836         * (popReleaseTempReg): pops contents of temporary register from
1837         stack. Use popGetTempReg/popReleaseTempReg in aligned pairs,
1838         * (pic16_popGet): separated case AOP_ACC to return register WREG
1839         from processor registers, AOP_PCODE not checks if pcop is PO_DIR
1840         or PO_IMMEDIATE and initializes their instance/offset appropriately,
1841         * The whole issue with aopForSym,aopForRemat,popGet) is to minimize
1842         the use of immediate pointers to certain cases only.
1843
1844         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): use pic16_popGet2p,
1845         * (pic16_loadFromReturn, pic16_storeForReturn: NEW,
1846         * (assignResultValue, genCall, genRet): modified to use the new
1847         function return value scheme with WREG,PRODL,PRODH,FSR0L and FSR0,
1848         genPcall is still broken,
1849         * (genFunction): added code to create 'A' type pBlocks when
1850         interrupt functions are generated, code not extensively tested yet,
1851         ISRs push WREG,STATUS,BSR,PRODL,PRODH,FSR0L,FSR0H registers on stack,
1852         * (genEndFunction): modified so ISRs pop stored registers from stack,
1853         * (genMultOneByte): cleanup,
1854         * (AccRsh): added flag andmask, to and result with appropriate mask,
1855         * (genUnpackBits,genPackBits): fixed and can handle bit fields,
1856         * (genDataPointerGet): fixed and reenabled its use,
1857         * (genNearDataPointerGet): bugs fixed,
1858         * (genDataPointerSet): bugs fixed,
1859         * src/pic16/genutils.c: added functions pic16_DumpValue,pic16_DumpAop,
1860         pic16_DumpSymbol, pic16_DumpOp,
1861         * src/pic16/genutils.h: function prototypes for the above functions,
1862         * src/pic16/glue.c: new flags initsfpnt, to initialize stack/frame
1863         pointers,
1864         * (pic16emitRegularMap): many many many improvements, but needs a
1865         major cleanup,
1866         * src/pic16/main.c: enable_stack in pic16_options is removed,
1867         * (_pic16_parseOptions): removed command line options -penable-stack,
1868         * (_process_pragma): emit stack symbol only when stack pragma is
1869         processed,
1870         * src/pic16/pcode.c: pic16_pc_fsr0 is removed, all operations are
1871         redirected to FSR0L/FSR0H pair,
1872         * (pic16_get_op, pic16_get_op2): modifications and improvements,
1873         * (pic16_getRegFromInstruction, pic16_getRegFromInstruction2): added
1874         cases PO_PRODL,PO_PRODH, pic16_getRegFromInstruction2 returns sane
1875         for immediates,
1876         * (insertBankSwitch): modified to handle cases like: (alfa + 1)
1877         * (dumpPicOptype): NEW,
1878         * src/pic16/pcode.h: added PO_PCLATU,PO_PRODL,PO_PRODH in enum,
1879         * src/pic16/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed bug
1880         with movff instruction,
1881         * src/pic16/ralloc.c: renamed typeRegWithIdx to pic16_typeRegWithIdx,
1882         added pic16_int_regs, some packRegsFor* functions are commented out,
1883         because produce errors,
1884         * src/pic16/NOTES: minor modifications
1885
1886 2004-02-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1887
1888         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c, as/mcs51/lkmain.c,
1889         as/mcs51/lkmem.c, src/SDCCglob.h, src/SDCCmain.c: added options --stack-size and
1890         --pack-iram.
1891         * doc/sdccman.lyx: described options --stack-size and --pack-iram.
1892         * as/mcs51/lkaomf51.c: fixed bug #895763
1893
1894 2004-02-17 Bernhard Held <bernhard AT bernhardheld.de>
1895
1896         * device/include/c8051f320.h: added. Contributed by Maarten Brock.
1897
1898 2004-02-17 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1899
1900         * doc/sdccman.lyx: added details about the HC08 storage classes and
1901         interrupts, fixed the register usage info for z80 & gbz80
1902
1903 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
1904
1905         * doc/sdccman.lyx: added more pic16 port documentation
1906         * device/include/pic16/: added header pic18fregs.h
1907
1908 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
1909
1910         * doc/sdccman.lyx: added Vangelis' contribution
1911
1912 2004-02-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1913
1914         * src/SDCClrange.c (rlivePoint): live range of SEND operand should
1915         extend to the next CALL or PCALL, not just to the next CALL.
1916
1917 2004-02-16 Vangelis Rokas <vrokas AT otenet.gr>
1918
1919         * src/pic16/gen.c (genInline): fixed bug #896482 with inline assembly
1920
1921 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1922
1923         * src/mcs51/ralloc.c (packRegsForAssign, reassignAliasedSym): fixed
1924         bug #895752 and a better fix for bug #716790
1925
1926 2004-02-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1927
1928         * src/SDCCsymt.c (processFuncArgs): fixed bug #896796
1929
1930 2004-02-14 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1931
1932         * doc/sdccman.lyx: minor changes, minor changed
1933
1934 2004-02-13 Bernhard Held <bernhard AT bernhardheld.de>
1935
1936         * src/SDCCicode.c (usualBinaryConversions): removed pic16 from ports
1937         which can't handle SDCC_NEWONEBYTEOPS,
1938         (geniCodeMultiply): removed conversion from mult to shift for pic14
1939         and pic16
1940
1941 2004-02-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1942
1943         * src/hc08/gen.h,
1944         * src/hc08/gen.c (storeRegToAop, aopOp, aopAdrStr, accopWithAop,
1945         rmwWithAop): Ported my 2003-10-02 fix for bug #663539 to the hc08,
1946         thus fixing bug #895406
1947
1948 2004-02-11 Bernhard Held <bernhard AT bernhardheld.de>
1949
1950         * device/lib/_modsint.c,
1951         * device/lib/_modslong.c: sign follows divisor only
1952         * src/hc08/gen.c (genMultOneByte): if result size is 1,
1953         signs or signedness can be ignored
1954         * src/SDCCast.c (addCast): cosmetic - added lineno to CAST
1955         * src/SDCCast.c (resultTypePropagate): added even more ops: +, - and *,
1956         added optimization for IFX,
1957         (decorateType): Mult/Div/ModOneByte ops can handle all kind of signed
1958         arguments;
1959         reenabled optimization for IFX, which was removed on 2004-01-11
1960         * src/SDCCast.h: added return type IFX
1961         * src/SDCCicode.c: Mult/Div/ModOneByte ops can handle all kind of signed
1962         arguments with 8 or 16 bit results; pic14 and pic16 ports use old
1963         promotion behaviour; env. var. SDCC_NEWONEBYTEOPS selects the new,
1964         SDCC_OLDONEBYTEOPS selects the old behaviour
1965         * src/SDCCsymt.c (computeType): type2 can be NULL (for LEFT_OP);
1966         changed again and commented promotion rule
1967         * src/SDCCval.c (valDiv): promotion no longer necessary
1968         * src/ds390/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte),
1969         * src/mcs51/gen.c (genMultOneByte) (genDivOneByte) (genModOneByte):
1970         rewritten
1971         * support/regression/tests/onebyte.c: added
1972
1973 2004-02-11 Vangelis Rokas <vrokas AT otenet.gr>
1974
1975         * gen.c (genInline): reverted to old code for assemnling inline
1976         code because of bug reported James Chadd
1977
1978 2004-02-10 Vangelis Rokas <vrokas AT otenet.gr>
1979
1980         * ralloc.h: missing declarations from previous patch,
1981         seems that patch for ralloc.h was never applied, fixed
1982
1983 2004-02-10 Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
1984            patch committed by Vangelis Rokas <vrokas AT otenet.gr>
1985
1986         * pcode.c,
1987         * pcode.h,
1988         * ralloc.h: added FSR0L, FSR0H and other missing PIC16 SFR's for
1989         indirect addressing. Marked FSR0 as deprecated
1990         * gen.c (pointerCode): commented out, not needed now
1991         (pic16_popGet2p): new MOVFF helper function
1992         (genGenPointerGet),
1993         (genGenPointerSet): reimplemented with MOVFF and POSTINC0
1994         (shiftRLong): removed duplicate debugging info
1995
1996 2004-02-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1997
1998         * src/ds390/gen.c (genNearPointerGet),
1999         * src/mcs51/gen.c (genNearPointerGet): allow the genDataPointerGet()
2000         optimization with bits, but not bitfields.
2001         * src/ds390/ralloc.c (packRegisters),
2002         * src/mcs51/ralloc.c (packRegisters): fixed bug #884453 & #880832
2003
2004 2004-02-09 Bernhard Held <bernhard AT bernhardheld.de>
2005
2006         * src/SDCCcse.c (algebraicOpts): copy operands before modification
2007
2008 2004-02-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2009
2010         * src/SDCCsymt.h,
2011         * src/SDCCicode.c (operandFromSymbol),
2012         * src/mcs51/ralloc.c (verifyRegsAssigned, serialRegAssign),
2013         * src/ds390/ralloc.c (verifyRegsAssigned, serialRegAssign),
2014         * src/z80/ralloc.c (verifyRegsAssigned, serialRegAssign),
2015         * src/hc08/ralloc.c (verifyRegsAssigned, serialRegAssign),
2016         * src/pic/ralloc.c (verifyRegsAssigned, serialRegAssign),
2017         * src/pic16/ralloc.c (verifyRegsAssigned, serialRegAssign): fixed
2018         bug #892038
2019         * src/SDCCast.c (createIvalStruct, createIvalArray, gatherAutoInit),
2020         * src/SDCCglue.c (emitRegularMap, printIvalStruct, printIvalArray,
2021         printIvalCharPtr, printIvalPtr, printIval, emitStaticSeg, emitOverlay)
2022         * src/SDCCsymt.c (newSymbol),
2023         * src/SDCC.y (struct_or_union_specifier, enum_specifier,
2024         enumerator_list),
2025         * src/SDCCval.h,
2026         * src/SDCCval.c (newiList): fixed bug #885705
2027
2028 2004-02-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2029
2030         * doc/sdccman.lyx: added section 3.1.4: sdcclib.
2031         * as/mcs51/lkmem.c: report the size of the stack in .mem file.
2032
2033 2004-02-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2034
2035         * device/include/c8051f120.h,
2036         * device/include/c8051f300.h,
2037         * device/include/c8051f310.h: added/updated header files for Silicon
2038         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
2039         * doc/sdccman.lyx: minor changes, recommended diff -Naur and diff -u
2040         in new section Submitting patches
2041
2042 2004-02-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2043
2044         * src/mcs51/gen.c (genNearPointerGet, genPagedPointerGet,
2045         genFarPointerGet, genCodePointerGet, genGenPointerGet,
2046         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
2047         genGenPointerSet),
2048         * src/ds390/gen.c (genNearPointerGet, genPagedPointerGet,
2049         genFarPointerGet, genCodePointerGet, genGenPointerGet,
2050         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
2051         genGenPointerSet),
2052         * src/pic16/gen.c (genNearPointerGet, genPagedPointerGet,
2053         genFarPointerGet, genCodePointerGet, genGenPointerGet,
2054         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
2055         genGenPointerSet),
2056         * src/pic/gen.c (genNearPointerGet, genPagedPointerGet,
2057         genFarPointerGet, genCodePointerGet, genGenPointerGet,
2058         genNearPointerSet, genPagedPointerSet, genFarPointerSet,
2059         genGenPointerSet): fixed bug #892400
2060         * src/pic16/gen.c (genSkipz, AccRol): disabled functions with #if 0
2061         to eliminate build warnings.
2062         * src/SDCCast.c (processParms),
2063         * src/SDCC.y (function_declarator2, declarator2_function_attributes):
2064         fixed bug 751859
2065         * support/valdiag/valdiag.py: added GCC to the list of defines active
2066         when compiling with gcc
2067
2068 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2069
2070         * support/Util/SDCCerr.h,
2071         * support/Util/SDCCerr.c,
2072         * src/SDCCast.c (decorateType, sizeofOp): complain when sizeof is used
2073         with an incomplete type (fixed bug #883734)
2074         * src/SDCCicode.c (geniCodeCast): fixed bug #890510
2075
2076 2004-02-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2077
2078         * src/pic16/gen.c (genCmpEq, shiftRLong): fixed declarations
2079
2080 2004-02-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2081
2082         * src/SDCCast.c (decorateType),
2083         * src/SDCCicode.c (geniCodeParms, geniCodeCall): fixed bugs in my ANSI
2084         function pointer implementation
2085         * support/regression/tests/funptrs.c: added tests to verify both forms
2086         of function pointers work correctly. Added tests to verify parameters
2087         are passed in the correct order.
2088
2089 2004-02-06  Vangelis Rokas <vrokas AT otenet.gr>
2090
2091         * device.c (regCompare): registers are sorted by ascending
2092         address and increasing size,
2093         * main.c (_pic16_finaliseOptions): removed the declaration
2094         of compiler macro MCU. Now a macro of the format pic18fxxxx
2095         will be defined from the command line
2096
2097 2004-02-06  Hans-Juergen Dorn <hans.dorn AT apl-landau.de>
2098             patch committed by Vangelis Rokas <vrokas AT otenet.gr>
2099
2100         * pcode.c (pic16initMnemonics): fixed typo in assignment to PCOP_RLNCF
2101         PCOP_RLCF was overwritten!
2102         * gen.c (genSkip): commented out calls to pic16_emitcode,
2103         * (genCmpEQ): fixed "long" compares, only high word did get compared,
2104         * (genlshTwo),
2105         * (genRRC): added debugging info,
2106         * (shiftL2Left2Result): Fixed bug, if offr > offl. Result got
2107         overwritten while shifting,
2108         * (shiftR2Left2Result): Fixed bug, if offr < offl. Result got
2109         overwritten while shifting,
2110         * (AccLsh),
2111         * (AccRsh),
2112         * (shiftLLeftOrResult),
2113         * (shiftRLeftOrResult),
2114         * (shiftRLong),
2115         * (shiftLLong): Implemented with pic16_emitpcode
2116         * (genlshFour): Replaced pic16_aopPut with pic16_emitpcode,
2117         * (genLeftShift): Fixed bug, operand for shift by variable always
2118         was "and"ed with 0x0f,
2119         * (genLeftShiftLiteral),
2120         * (genrshTwo),
2121         * (genRightShiftLiteral): added debugging info,
2122         * (genrshFour): added comment,
2123         * (genRightShift): determined signedness from operand "left"
2124         instead of "result"
2125
2126 2004-02-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2127
2128         * src/SDCCicode.c (geniCodeParms),
2129         * src/SDCCast.c (decorateType, processParms): support for ANSI-style
2130         function pointers, fixed function pointer bugs #861242 and #861896
2131
2132 2004-01-31 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2133
2134         * device/include/c8051f000.h,
2135         * device/include/c8051f120.h,
2136         * device/include/c8051f300.h: added header files for Silicon
2137         Laboratories (formerly Cygnal) CPUs. Contributed by Maarten Brock.
2138
2139 2004-01-31 Bernhard Held <bernhard AT bernhardheld.de>
2140
2141         * src/SDCCast.c (processParams): added new type flow and restructured
2142         (gatherAutoInit): added new type flow
2143         (addCast): cosmetic changes
2144         (getLeftResultType): added new type flow for array indices, patch
2145         provided by Stas, see FR #877103
2146         (decorateType): SDCC_NEWTYPEFLOW removed, new type flow is now standard;
2147         array index patch by Stas
2148         * src/SDCCast.h: added prototype getResultTypeFromType()
2149         * src/SDCCval.h,
2150         * src/SDCCval.c (resolveIvalSym) (resolveIvalSym),
2151         * src/pic/glue.c (pic14emitStaticSeg),
2152         * src/pic16/glue.c (pic16emitStaticSeg),
2153         * src/SDCCglue.c (emitRegularMap) (emitStaticSeg): added new type flow
2154         for initialization of symbols
2155         * src/SDCCicode.c (geniCodeArray): removed warning W_ARRAY_BOUND
2156         * support/Util/SDCCerr.h:
2157         * support/Util/SDCCerr.c: replaced W_ARRAY_BOUND by W_IDX_OUT_OF_BOUNDS
2158         * .version: bumped version number to 2.3.8
2159         * device/include/Makefile.in (install),
2160         * doc/Makefile (install): changed to 'rm `find ...`' construct to
2161         avoid warnings
2162
2163 2004-01-30 Bernhard Held <bernhard AT bernhardheld.de>
2164
2165         * support/regression/tests/libmullong.c: fixed for 64 bit hosts
2166         Slade Rich fixed an optimization bug
2167         * src/pic/pcodepeep.c,
2168         * src/pic/pcoderegs.c
2169         * doc/Makefile (install): added test for directory
2170
2171 2004-01-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2172
2173         * src/mcs51/ralloc.c (getRegPtr, getRegGpr),
2174         * src/ds390/ralloc.c (getRegPtr, getRegGpr),
2175         * src/pic/ralloc.c (getRegPtr, getRegGpr),
2176         * src/pic16/ralloc.c (getRegPtr, getRegGpr),
2177         * src/z80/ralloc.c (getRegGpr): fixed bug #883361
2178         * as/mcs51/asexpr.c (term),
2179         * as/hc08/asexpr.c (term): fixed bug #887146
2180
2181 2004-01-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2182
2183         * src/z80/gen.c (genMult): handle single byte result product
2184         * src/SDCCopt.c (killDeadCode): never convert ADDRESS_OF iCode to
2185         DUMMY_READ_VOLATILE (fixed bug #886367)
2186
2187 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
2188
2189         * support/regression/tests/libmullong.c: fixed logic, on little endian
2190         hosts we ended without a mullong_wrapper()
2191
2192 2004-01-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2193
2194         * ChangeLog: changed "@" to " AT " in hopes of reducing spam and
2195         virus/worm forged address usage.
2196
2197 2004-01-27 Bernhard Held <bernhard AT bernhardheld.de>
2198
2199         Fixed promotion, it should be done on AST level:
2200         * src/SDCCast.c (addCast): added promotion to int
2201         (decorateType): updated call to upCast()
2202         * src/SDCCicode.c (geniCodeLeftShift): removed call to
2203         usualUnaryConversions()
2204
2205 2004-01-26  Michael Hope  <michaelh AT juju.net.nz>
2206
2207         * support/regression/tests/literalop.c (mulWrapper): Added a
2208         wrapper to remove integer overflow warnings.
2209
2210         * support/regression/tests/float_trans.c: Made work on host.
2211
2212         * support/regression/ports/ucz80/spec.mk (UCZ80): Made detect the
2213         location of sz80.
2214
2215         * support/regression/generate-cases.py (main): Changed from inline
2216         to a main method.
2217
2218         * doc/Makefile (install): Changed to depth first to get rid of
2219         missing directory install warning.
2220
2221         * as/Makefile (install-doc): Made work on Mac.
2222
2223 2004-01-25 Bernhard Held <bernhard AT bernhardheld.de>
2224
2225         * src/SDCCast.c: added an additional type flow in decorateType() of
2226         opposite direction, see feature request #860006; it's enabled at runtime
2227         by setting the environment variable SDCC_NEWTYPEFLOW
2228         * src/SDCCast.h: changed prototype of decorateType()
2229         * src/SDCCglue.c (emitRegularMap): updated call of decorateType()
2230         * src/SDCCicode.c (geniCodeDivision) (geniCodeModulus): promotion from
2231         'char' to 'int' can be omitted, if both operands are 'unsigned char';
2232         see feature request #877103
2233         * src/SDCCval.c: updated call of decorateType()
2234         (valBitwise): fixed bug #882876
2235         (valMinus): added promotion
2236         (valLogicAndOr): result is unsigned
2237         (cheapestVal) (constVal): literals from 0...255 are 'unsigned char' now
2238         * src/SDCCsymt.c (computeType),
2239         * src/mcs51/gen.c (genCmpGt) (genCmpLt): literal 'unsigned char'
2240         must not cause an unsigned operation
2241         * src/pic/glue (pic14emitRegularMap),
2242         * src/pic16/glue.c (pic16emitRegularMap): updated call of decorateType()
2243
2244 2004-01-23 Bernhard Held <bernhard AT bernhardheld.de>
2245
2246         * src/pic/pcode.c (PCodeID): commented out left over debug code
2247
2248 2004-01-20 Bernhard Held <bernhard AT bernhardheld.de>
2249
2250         * support/valdiag/tests/overflow.c: added shift tests
2251         * src/pic/device.c,
2252         * src/pic/gen.c,
2253         * src/pic/gen.h,
2254         * src/pic/glue.c,
2255         * src/pic/main.c,
2256         * src/pic/pcode.c,
2257         * src/pic/pcode.h,
2258         * src/pic/pcodepeep.c,
2259         * src/pic/pcoderegs.c,
2260         * src/pic/ralloc.c,
2261         * src/pic/ralloc.h: applied patch from Slade Rich;
2262         added support for multiple code pages and multiple RAM banks on the
2263         PIC 14 port. The ASM files now no longer simply assume all the
2264         code / RAM are in the same page / bank. This means the linker can
2265         safely allocate code/RAM of separate ASM files to different pages/banks.
2266         * doc/sdccman.lyx: added Slade's tips
2267         * src/mcs51/peeph.def: fixed bug #880768
2268
2269 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2270
2271         * src/hc08/ralloc.c (rematStr): fixed bug #879282
2272         * src/SDCCast.c (decorateType): fixed bug #880197
2273
2274 2004-01-20  Michael Hope  <michaelh AT juju.net.nz>
2275
2276         * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
2277         getopt.h.
2278
2279         * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
2280         strtof is not part of C89 and isn't included with Mac OS X.
2281
2282 2004-01-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2283
2284         * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
2285         shiftL2Left2Result): fixed bug #879326
2286         (genAnd, genOr, genXor): fixed bug when result was of type AOP_CRY
2287         (genMultOneByte): fixed bug in signed vs unsigned multiplication
2288         * sim/ucsim/hc08.src/inst.cc (inst_clr): added missing effective
2289         address fetch for clr instruction
2290         * device/lib/hc08/_mulint.c: created optimized assembly version
2291         * src/SDCCdflow.c (computeDataFlow): fixed bug #878209
2292
2293 2004-01-19 Bernhard Held <bernhard AT bernhardheld.de>
2294
2295         * src/SDCCicode.c (geniCodeArray): applied patch from Stas Sergeev
2296         proposed in FR #877103
2297
2298 2004-01-18 Bernhard Held <bernhard AT bernhardheld.de>
2299
2300         * src/SDCCval.c (cheapestVal): added missing checks
2301         * src/SDCCicode.c (usualBinaryConversions): fixed condition
2302         * src/SDCCicode.c (geniCodeAdd): fixed part of bug #877103
2303
2304 2004-01-16 Klaus Flittner <klaus_flittner AT gmx.de>
2305
2306         * src/ds390/gen.c (aopOp3): fixed the assignment of different dptrs to
2307         equal operands
2308
2309 2004-01-16 Vangelis Rokas <vrokas AT otenet.gr>
2310
2311         * src/SDCCmain.c (linkEdit): variable $3 of the linker command is
2312         loaded with the linker search paths (-L arguments) and the libraries
2313         to be linked with the current source (-l arguments). Changes
2314         currently will affect only the pic16 port.
2315         * src/pic16/main.c (_pic16_finaliseOptions): add to the linker
2316         include path the port specific paths and port specific libraries,
2317         * gplink command now contains the $3 argument,
2318         * src/pic16/device.h,
2319         * src/pic16/device.c,: structure PIC_device is made public and
2320         renamed to PIC16_device, the same for variable Pics which is renamed
2321         to Pics16. Updated all references to them.
2322         * src/pic16/glue.c (pic16glue): corrected bug with code
2323         initialization which bypassed the variable initializations block.
2324
2325         * device/lib/pic16/Makefile.rules: removed --penable-stack from
2326         COMPILE_FLAGS and added the --nostdinc option
2327
2328 2004-01-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2329
2330         * device/include/mc68hc908jb8.h: Register defs for another member
2331         of the hc08 family. Contributed by Bjorn Bringert - thanks!
2332
2333 2004-01-14 Vangelis Rokas <vrokas AT otenet.gr>
2334
2335         Documenting changes from previous commits.
2336         * configure.in (version 1.56),
2337         * configure: initially I've added AC_CONFIG_SUBDIRS(device/lib/pic16)
2338         when generating output files to configure the pic16 library,
2339         but now I've commented it out, since gputils aren't installed in the
2340         SF compile farm, so library won't compile
2341
2342         * device/lib/Makefile.in (version 1.56): initially I've added in
2343         target 'all' the prerequestive 'model-pic16' so it compiled the
2344         pic16 library, but now I've commented it out for the same reasons
2345         above,
2346         * added targets 'model-pic16' and 'objects-pic16' to compile the
2347         library
2348         * added target 'port-specific-objects-pic16' to handle the
2349         generated libraries and copy them into the build/ directory
2350         * added target 'clean-intermediate-pic16' to clean intermediate
2351         files into pic16 directory
2352         * in target 'installdirs' added line to create directory pic16 in
2353         the installation path
2354
2355         * device/include/Makefile.in (version 1.11): in target 'install'
2356         added lines to copy all header files to installation path,
2357         * in target 'installdirs' added line create directory for pic16
2358         headers in the installation path
2359
2360 2004-01-13 Klaus Flittner <klaus_flittner AT gmx.de>
2361
2362         * src/ds390/gen.c (genCall): fixed a double use of acc and b after
2363          a function call
2364
2365 2004-01-13 Bernhard Held <bernhard AT bernhardheld.de>
2366
2367         * configure,
2368         * device/lib/configure.in,
2369         * device/lib/configure: fixed for autoconf 2.57
2370
2371 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2372
2373         * src/z80/main.c (_parseOptions): fixed the portmode= command line
2374         option so that it actually works. Made it specific to the z80, since
2375         the gbz80 doesn't have these kinds of I/O ports.
2376
2377 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2378
2379         * device/include/z180.h,
2380         * device/lib/_memcpy.c,
2381         * device/lib/_memmove.c,
2382         * device/lib/_mulint.c,
2383         * device/lib/ser_ir.c,
2384         * device/lib/ser_ir_cts_rts.c,
2385         * device/lib/_strcmp.c,
2386         * device/lib/_strtok.c: fixed pragmas to non-deprecated form
2387         * src/z80/main.c (_process_pragma): add support for pragmas bank and
2388         portmode; added deprecation warning for bank= and protmode= forms.
2389         Also, guard against buffer overflow.
2390         * src/z80/gen.c (aopGet): generate better code for sfr banked read
2391
2392 2004-01-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2393
2394         * src/hc08/main.c (_hc08_genAssemblerPreamble): fixed bug #875487. Also
2395         changed interrupt vector table generation to only emit declared vectors.
2396         * device/include/Makefile.in: added missing backslash
2397         * device/lib/pic16/Makefile.rules: add $(MODELFLAGS) to $(CFLAGS)
2398
2399 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
2400
2401         Mainly changes to support compilation of the device libraries
2402         * src/pic16/device.c: stack is allocated via symbol and not
2403         via literal number. The symbol is placed in the corresponding
2404         position of the data ram
2405         * (pic16_dump_section): relocatable and absolute uninitialized
2406         data are now emitted in sorted order to reduce section naming,
2407         * src/pic16/ralloc.c (newReg): fixed bug with SFR's that
2408         weren't marked as being in the access bank,
2409
2410 2004-01-13 Vangelis Rokas <vrokas AT otenet.gr>
2411
2412         Added portion of GNU PIC Library under the directory
2413         device/include/pic16 and device/lib/pic16. These files
2414         contain the declarations of SFRs for the PIC18Fxx2 devices.
2415         The directory is initialized via configure from toplevel.
2416
2417 2004-01-12 Klaus Flittner <klaus_flittner AT gmx.de>
2418
2419         * src/ds390/gen.c (operandsEqu): fixed a little typo, that prevented
2420         the spilllocations to be compared correctly
2421
2422 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
2423
2424         * src/SDCCast.c (decorateType): fixed bug introduced today
2425
2426 2004-01-12  Borut Razem <borut.razem AT siol.net>
2427
2428         * src/SDCC.lex, support/Util/SDCCerr.h, support/Util/SDCCerr.c,
2429         doc/sdccman.lyx: upper case pragmas are deprecated
2430
2431 2004-01-12 Bernhard Held <bernhard AT bernhardheld.de>
2432
2433         * src/SDCCast.c (decorateType): replacing 'ul > 0' by  '!ul' results
2434         in simpler and even better code
2435
2436 2004-01-11 Bernhard Held <bernhard AT bernhardheld.de>
2437
2438         * src/SDCCicode.c (operandOperation): fixed bug #874819
2439         * src/SDCCast.c (decorateType): fixed
2440         char foo (unsigned long ul) { return ul > 0; }
2441
2442 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2443
2444         * doc/sdccman.lyx: Moved and added some sections, small changes
2445         all over. Telling LaTeX to be less strict with word spacing
2446         to better keep the right margin. Changed some notes about
2447         maintainance of the ports in section 3.2.1 - is it OK like this?
2448
2449 2004-01-11 Vangelis Rokas <vrokas AT otenet.gr>
2450
2451         SDCC source changes:
2452         * src/SDCCopt.c (cntToFcall, cnvToFloatCast, cnvFromFloatCast,
2453         convilong): modified to inform the pic16 port that builtin functions
2454         are external
2455
2456         PIC16 PORT specific changes:
2457         * src/pic16/device.c pic16_dump_equates() added,
2458         processor registers declared internally by the port are emitted in
2459         the translation as equates,
2460         * src/pic16/gen.c: inline code is passed unprocessed to the
2461         translation,
2462         * (pic16_popGetLit2): fnuction modified to take second operand as
2463         pCodeOp pointer and not as literal,
2464         * (popRegFromIdx): prefixed with pic16_,
2465         * (pic16_popCombine2): modified to receive already allocated pCode
2466         operands,
2467         * (pic16_pushpCodeOpReg, pic16_poppCodeOpReg): added
2468         * (genFunction): initializes local stack frame and pushes on stack
2469         all the registers used by this function,
2470         * (genEndFunction): restores all registers from stack and restores
2471         stack frame,
2472         * src/pic16/glue.c (pic16emitRegularMap): various changes and
2473         improvements,
2474         * (pic16glue): changed the program startup sequence,
2475         * added new dbName code 'A' for functions placed in absolute section
2476         * src/pic16/main.c: added function attribute _naked,
2477         * added pragma 'code' to place a fnuction at an absolute address,
2478         * added command line arguments --debug-ralloc and --pcode-verbose,
2479         * (_pic16_finiliseOptions): options.all_callee_saves is set by default
2480         * src/pic16/pcode.c (pic16_pBlockConvert2Absolute) added,
2481         * (pic16_newpCodeOpLit2): modified to take the second operand as
2482         pCodeOp pointer,
2483         * (pic16_printpBlock): modified to emit each function in a separate
2484         section,
2485         * (pic16_get_op): modified to use the gpasm modifiers LOW,HIGH and
2486         UPPER for immediate operands,
2487         * src/pic16/pcodepeeph.c: added peephole support for the LFSR
2488         instruction,
2489         * src/pic16/peeph.def: all peepholes with movff are commented out,
2490         because there is a problem in the pcode peep optimizer,
2491         * src/pic16/ralloc.c: the register allocator can now reuse local
2492         function symbols for another function. This saves register usage.
2493         * src/pic16/ralloc.h: added flag isLocal in structure regs,
2494
2495         Added file src/pic16/NOTES with information about program writing on
2496         the current port version.
2497
2498 2004-01-11 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2499
2500         * src/mcs51/peephole.def: added peepholes 177.c,d (redundant moves)
2501         and peephole 252 (array access)
2502
2503 2004-01-09  Borut Razem <borut.razem AT siol.net>
2504
2505         * src/SDCCmain.c : fixed #872250: -l command line defined library
2506           files are scanned before standard library files
2507
2508 2004-01-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2509
2510         * src/SDCCast.c (decorateType): fixed bug #874046
2511
2512 2004-01-09  Borut Razem <borut.razem AT siol.net>
2513
2514         * support/scripts/sdcc.nsi: remove previous installation
2515
2516 2004-01-09 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2517
2518         * src/SDCCglue.c (createInterruptVect): don't append 7(5) padding
2519         bytes for last interrupt vector (mcs51)
2520         * sdcc.spec: fixed typo
2521
2522 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2523
2524         * src/mcs51/gen.c (genFunction, genEndFunction, genReceive, getTempRegs,
2525         gen51Code): more efficient parameter receive for --model-large
2526         ("bug" #845294)
2527
2528 2004-01-09 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2529
2530         * src/ds390/main.c,
2531         * src/z80/main.c: added missed needLinkerScript flags (more than
2532         one port structure defined in these file)
2533         * src/ds390/gen.c (aopForSym, aopOp, operandsEqu, aopOp3): fixed
2534         bug #795325
2535
2536 2004-01-08 Vangelis Rokas <vrokas AT otenet.gr>
2537
2538         * src/SDCCmain.c: removed various references to DEFAULT_PORT
2539         * src/port.h: added flag needLinkerScript in port->linker
2540         structure to inform whether to create a .lnk file or not,
2541         * src/avr/main.c,
2542         * src/ds390/main.c,
2543         * src/hc08/main.c,
2544         * src/mcs51/main.c,
2545         * src/pic/main.c,
2546         * src/pic16/main.c,
2547         * src/xa51/main.c,
2548         * src/z80/main.c: changed appropriately to configure
2549         needLinkerScript flag
2550         * src/pic/gen.c,
2551         * src/pic16/gen.c (genAddrOf): fixed bug #863624
2552         * src/pic/glue.c: added variable udata_section_name to
2553         override default uninitialized data segment definition for
2554         devices only with SHAREBANK memory (reported from Erik Epetrich)
2555         * (pic14emitOverlay): modified to emit a commented overlay segment
2556         directive when no overlay data exist
2557         * (picglue): modified to emit uninitialized data segment
2558         according to udata_section_name
2559         * src/pic/main.c (_pic14_parseOptions): added command line
2560         options --udata-section-name=[name] to override default
2561         udata definition name
2562         * modified _linkCmd and _asmCmd to include compiler passed
2563         arguments via -W option
2564         * src/pic16/main.c: added $l in _asmCmd, changed extension for
2565         object file from '.rel' to '.o' in port->linker structure,
2566         changed size of fptr from 2 to 3 in port structure
2567
2568 2004-01-07  Borut Razem <borut.razem AT siol.net>
2569
2570         * support/scripts/sdcc.nsi: update PATH
2571         * support/scripts/sdcc.ico: craeted
2572
2573 2004-01-07 Bernhard Held <bernhard AT bernhardheld.de>
2574
2575         * device/include/Makefile.in: fix install
2576         * doc/Makefile: fix install
2577
2578 2004-01-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2579
2580         * src/SDCCsymt.c (processFuncArgs): fixed superflous allocation noted
2581         in bug #860505
2582         * src/SDCCmem.c (printAllocInfoSeg, printAllocInfo): minor changes to
2583         how the function variable allocation summary is displayed; also
2584         include information about variables allocated to the overlay
2585         segment
2586
2587 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2588
2589         * as/mcs51/lkmain.c: Help about -Y option
2590         * as/mcs51/lkarea.c: Fixed gcc warnings
2591
2592 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
2593
2594         * src/SDCCval.c (valShift): changed from 16 to 32 bit shift count,
2595         fixed warning
2596         * support/valdiag/tests/overflow.c: added
2597         * src/SDCCast.c (decorateType),
2598         * src/SDCCicode.c (geniCodeLeftShift): added promotion to int for
2599         LEFT_OP (left shift)
2600
2601 2004-01-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2602
2603         * as/mcs51/lkmain.c: stack must be after data when option -Y is not used
2604         (default behaviour).
2605
2606 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2607
2608         A python script to validate compiler diagnostic messages. It can be
2609         used to verify that sdcc complains about bad c source code and
2610         gives a good location of the error.
2611         * support/valdiag/Makefile,
2612         * support/valdiag/valdiag.py,
2613         * support/valdiag/tests/*
2614
2615 2004-01-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2616
2617         * src/SDCC.y (enum_specifier, enumerator_list, opt_assign_expr),
2618         * src/SDCCsymt.c (newEnumType),
2619         * src/SDCCsymt.h
2620         * support/Util/SDCCerr.c,
2621         * support/Util/SDCCerr.h: fixed bug #871258 and some other unreported
2622         enum related bugs.
2623         * support/regression/tests/enum.c: added test for enum values that
2624         require at least 2 bytes of storage.
2625
2626 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
2627
2628         * src/common.h: added ifndef/define/endif macros
2629         around the header file.
2630         Bug reported from Jesus Calvino-Fraga
2631
2632 2004-01-06 Bernhard Held <bernhard AT bernhardheld.de>
2633
2634         * sdcc.spec: updated
2635         * device/include/Makefile.in: don't install CVS directories
2636         * device/lib/Makefile.in: added removal of CVS directories after install
2637         * doc/Makefile: fixed install, added local_icons
2638         * sim/ucsim/gui.src/Makefile.in: fixed an old typo
2639         * src/mcs51/gen.c (genRightShift): fixed bug #870788
2640         * src/ds390/gen.c (genRightShift): fixed bug #870788
2641         * src/SDCCast.c (decorateType): fixed bug #870781
2642
2643 2004-01-06 Vangelis Rokas <vrokas AT otenet.gr>
2644
2645         PIC16 port related changes:
2646         * device.c: removed pic16_finalMapping and pic16_finalMappingSize,
2647         added variable stackPos,
2648
2649         * gen.c: genCall, assignResultValue: added support for
2650         pushing/retrieving function parameters to/from stack,
2651         genFunction,genEndFunction: setup stack frame for the
2652         generated function,
2653         genAddrOf: will be changed according to bug 863624
2654
2655         * added files genutils.c and genutils.h which contain gen*
2656         debugged and optimised functions extracted from gen.c
2657
2658         * glue.c: added variable 'externs' which holds extern symbols,
2659         pic16emitRegularMap: is modified to properly handle relocatable
2660          symbols under the new scheme,
2661         pic16createInterruptVect: is modified
2662         pic16printPublics: is modified to emit 'global' assembler directives,
2663         added pic16_printExterns to print extern symbols,
2664         pic16glue: initializes stack/frame pointer in the beginning of
2665         the assembly output. Temporary hack, will be corrected later,
2666         because gplink yet does not support stack and SDCC does not
2667         yet support a type of crt0.o object to create the final binary.
2668
2669         * Removed many lines that contain 8051 legacy code.
2670         * The code is finally placed under a 'code' directive.
2671         * Added port specific options.
2672
2673         * _process_pragma: simplified since now we do not need *special*
2674         include file to define SFR registers. But a separate header
2675         will be needed. This will be developed later.
2676         * _pic16_parseOptions: added, parses port specific options:
2677         --pgen-banksel, --obanksel=, --pomit-config-words, --pomit-ivt,
2678         --pleave-reset-vector, --penable-stack, --pstack-model, --debug-xtra
2679         --preplace-udata-with=
2680
2681         * _pic16_setDefaultOptions: modified to initialize section names,
2682         but hack is temporarly out of order since it needs improvement.
2683         * _pic16_genAssemblerPreamble: configuration words are emitted by
2684         their address instead of their name. This part is incomplete and
2685         supports only the 18Fxx2 devices. Other devices will emit an error
2686         during assembly since they do not contain the same set of config
2687         registers
2688         * _pic16_genIVT: is modified,
2689
2690         * pcode.c: added definitions for some hardware registers that are needed
2691         for stack support
2692         * added flag is2LitOp and variable pci_magic in pCodeInstruction.
2693         All PCI entries are updated. Now LFSR is supported.
2694         * Removed pic16_pciTRIS is mentioned by mdubuc in source
2695         * added pic16_newpCodeOpLit2 to support instructions with
2696         two literal arguments
2697         * pic16_pCode2str: corrected code that emits assembler instructions
2698         with two literal operands and those that have an access bit modifier
2699         * genericPrint: now PC_ASMDIR pCodes, can emit a label if it exists,
2700         this fixes a bug which caused some labels to be lost, when an
2701         assembler directive was added, i.e. banksel,
2702         * pic16_FixRegisterBanking: improved logic that causes the insertion
2703         of bank switching,
2704         * InlineFunction: functions that are called once, are not any more
2705         inlined. This can be a port option in the future,
2706
2707         * pcode.h: added pCodeOpLit2 and added variable label in pCodeAsmDir
2708
2709         * ralloc.c: added pic16_rel_udata and pic16_fix_udata variables which
2710         hold the corresponding uninitialized symbols,
2711         * pic16_allocProcessorRegister: registers have explicit marked the
2712         accessBank field,
2713         * pic16_allocInternalRegister: registers are explicit marked as
2714         not used,
2715         * pic16_writeUsedRegs: pic16_dynDirectBitRegs was missing from the
2716         processing list, so bit registers were lost,
2717         *
2718
2719         * ralloc.h: added field 'accessBank' and original symbol operand
2720         in register definition,
2721         * removed the field isMapped from register definition,
2722
2723         ** Several functions have been removed from various sources:
2724         BanksUsedFlow2,BanksUsedFlow,FixBankFlow,InstructionRegBank,
2725         pic16_addMemRange,pic16_isREGinBank,pic16_dump_map,pic16_dump_cblock
2726         isSFR,validAddress,mapRegister,assignRegister,pic16_assignFixedRegisters
2727         pic16_assignRelocatableRegisters
2728
2729         ** others have been introduced:
2730         pic16_areRegsSame,pic16_dump_section,checkAddReg,pic16_groupRegistersInSection
2731         pic16_popGetLit2,pic16_popCombine2,pushw,pushaop
2732
2733 2004-01-05 Vangelis Rokas <vrokas AT otenet.gr>
2734
2735         * support/scripts/inc2h.pl: changed definition of BIT_AT
2736         to emit 'sbit at' instead of 'bit at'. This was a request.
2737
2738         PIC16 port related preliminary changes:
2739         * gen.c: prefixed function popRegFromString with
2740         pic16_ and all references to it corrected
2741         * pcode.c: all pic16_pc_* hardware registers prefixed
2742         with underscore (_),
2743         pic16_popCopyGPR2Bit(): function sets register wasUsed=1
2744         * ralloc.c: newReg(): when register is REG_SFR then
2745         set address to rIdx,
2746         pic16_allocProcessorRegister(): marks register wasUsed=0
2747         pic16_writeUsedRegs(): added a call to assign processor
2748         registers via pic16_assignFixedRegisters
2749
2750 2004-01-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2751
2752         * as/mcs51/aslink.h, as/mcs51/lkarea.c, as/mcs51/lkdata.c,
2753         as/mcs51/lkmain.c, as/mcs51/lkmem.c: 8051 linker can now pack
2754         variables in unused register banks.  Also the SSEG is placed
2755         wherever there is enough space for it, and IDATA can be anywhere
2756         in internal RAM.  For now compile using -Wl-Y[stack_size].
2757         The mem file is different for this option as well, since it
2758         makes no sense of talking about DSEG lenght.
2759
2760 2004-01-02 Vangelis Rokas <vrokas AT otenet.gr>
2761
2762         * src/SDCClrange.c: fixed bug 869095 that caused segfault
2763         in certain cases, e.g. when ROM assignment, patch provided
2764         from Albert den Haan.
2765
2766 2004-01-01 Bernhard Held <bernhard AT bernhardheld.de>
2767
2768         Many signedness and type propagation fixes:
2769         * src/SDCCicode.c: made geniCodeCast() static
2770         replaced SPEC_ by IS_ (cosmetic)
2771         (operandOperation): fixed div and mod operation
2772         (usualBinaryConversions): added support for promotion of char
2773         (geniCodeMultiply): replaced (unsigned long) by (TYPE_UDWORD)
2774         (geniCodeDivision): replaced (unsigned long) by (TYPE_UDWORD)
2775         (geniCodeAdd): an array index will stay unsigned, even if promoted
2776         from char to int
2777         (geniCodeArray): ditto
2778         * src/SDCCicode.h: made geniCodeCast() static: removed prototype
2779         * src/SDCCsymt.c (computeType): added more support for char;
2780         promotion of char is selectable by promoteCharToInt, fixed signedness
2781         for all cases
2782         (powof2): replaced (unsigned long) by (TYPE_UDWORD)
2783         * src/SDCCsymt.h (powof2): replaced (unsigned long) by (TYPE_UDWORD)
2784         * src/SDCCval (val*): replaced signedness calculation by
2785         computeType()
2786         rearranged if-branches (cosmetic)
2787         (valShift): added warning W_SHIFT_CHANGED
2788         (valCompare): fixed problem with different types
2789         * src/hc08/rallo.c (leastUsedLR): fixed gcc 3.3 warning
2790         * support/regression/tests/literalop.c: added many cases
2791         * support/regression/tests/ast_constant_folding.c: changed finally to
2792         'unsigned int'
2793         * .version: new year, new version: 2.3.7
2794         * src/SDCCmain.c (main): applied patch #866468
2795         * debugger/mcs51/sdcdb.c (parseCmdLine): added -k for ucsim, patch
2796         provided by Scott Bronson
2797         * doc/sdccman.lyx: updated documentation for sdcdb
2798         updated and added chapter tips
2799
2800 2004-01-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2801
2802         * src/SDCCsymt.h: missing from yesterday's commits
2803
2804 2003-12-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2805
2806         * src/SDCC.y (struct_or_union_specifier),
2807         * support/Util/SDCCerr.c,
2808         * support/Util/SDCCerr.h: verify that struct & union tags are used
2809         as declared.
2810
2811 2003-12-29 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2812
2813         * src/SDCCglobl.h: missing from yesterday's commits
2814
2815 2003-12-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2816
2817         * src/SDCC.y (external_definition, type_specifier2, sfr_reg_bit,
2818         sft_attributes, struct_declaration, parameter_declaration,
2819         type_name, start_block, declaration_list),
2820         * src/SDCC.lex (check_type): support redefinition of typedef names
2821
2822 2003-12-22 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2823
2824         * src/mcs51/gen.c (genPlus): added special handling for 256 byte
2825         aligned xdata arrays. Erik helped me with the if clause.
2826
2827 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2828
2829         * device/lib/ds390/tinibios.c (CpuSpeed): suppress unreachable code
2830         warning
2831
2832 2003-12-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2833
2834         * src/SDCCast.h,
2835         * src/SDCCast.c (newAst_),
2836         * src/SDCCicode.h,
2837         * src/SDCCicode.c (ast2iCode, newiCode),
2838         * src/SDCCglobl.h,
2839         * src/SDCC.y (logical_and_expr, logical_or_expr, conditional_expr,
2840         expr, statement, expression_statement, selection_statement,
2841         iteration_statement, expr_opt, jump_statement): foundation for tracking
2842         sequence points
2843         * src/SDCCopt.c (killDeadCode): fixed bug #861580 (needs the sequence
2844         point code too)
2845
2846 2003-12-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2847
2848         * support/Util/SDCCerr.c,
2849         * src/SDCCast.h,
2850         * src/SDCCast.c (createCase, createDefault, decorateType),
2851         * src/SDCClabel.c (labelUnreach),
2852         * src/SDCC.y (labeled_statement, jump_statement): More improvements
2853         to error messages.
2854         * support/Util/SDCCerr.c (werrorfl): fixed a non-standard declaration
2855         (with thanks to Stas Sergeev)
2856         * device/include/time.h,
2857         * device/lib/time.c (CheckTime): suppress unreachable code warning
2858
2859 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2860
2861         * src/SDCCast.c (createIvalCharPtr),
2862         * src/SDCCglue.c (printChar): fixed bug #862241 (an error in my fix for
2863         bug #753752)
2864         * support/regression/tests/nullstring.c: tests for these two bugs
2865
2866 2003-12-18 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2867
2868         * support/Util/SDCCerr.h,
2869         * support/Util/SDCCerr.c (E_NOT_ALLOWED),
2870         * src/SDCC.y (struct_declaration, struct_or_union_specifier): complain
2871         about storage class and 'at' used inside struct or union
2872         * src/SDCCBBlock.c (iCodeFromeBBlock),
2873         * src/SDCCcse.c (ifxOptimize),
2874         * src/SDCCglue.c (emitRegularMap, initPointer, printIvalStruct,
2875         printIvalArray, printiValFuncPtr, printIvalCharPtr, printIvalPtr,
2876         printIval, emitStaticSeg, emitOverlay),
2877         * src/SDCClabel.c (deleteIfx),
2878         * src/SDCCopt.c (replaceRegEqv, eBBlockFromiCode),
2879         * src/SDCCast.c (resolveSymbols, createIvalStruct, createIvalArray,
2880         gatherAutoInit, processParms),
2881         * support/Util/SDCCerr.h,
2882         * support/Util/SDCCerr.c (werrorfl): Support for better error location
2883         reporting for post-parse errors.
2884
2885 2003-12-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2886
2887         * src/SDCCval.c (valPlus, valMinus, valShift): fixed some problems with
2888         implicit casts via union; they don't work on big endian systems
2889         (possible fix for bug #861138)
2890
2891 2003-12-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2892
2893         (committed by Erik Petrich <epetrich AT ivorytower.norman.ok.us> on Frieder's behalf)
2894         * src/mcs51/main.c: fixed the fix for bug #737001
2895
2896 2003-12-15  Borut Razem <borut.razem AT siol.net>
2897
2898         * support/scripts/sdcc.nsi: updated for NSIS 2.0 beta 4
2899
2900 2003-12-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2901
2902         * support/makebin/makebin.c: put output in binary mode
2903
2904 2003-12-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2905
2906         * src/mcs51/main.c: fixed bug #737001 for the mcs51. SDCC clears
2907         xdata and data memory on startup. Set the environment variable
2908         SDCC_NOGENRAMCLEAR to disable this.
2909         * src/mcs51/peephole.def,
2910         * src/ds390/peephole.def: using the atomic test and clear instruction jbc
2911         (allows non-interrupt and interrupt code to safely compete for a resource
2912         without the non-interrupt code having to disable interrupts)
2913
2914 2003-12-13 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2915
2916         * src/SDCCicode.c (geniCodeAdd),
2917         * src/SDCCast.c (decorateType): fixed bug #857753 (need to be careful
2918         with valFromType if type might be a pointer and host is big endian).
2919         * src/SDCCast.c (decorateType): unary plus compatible with all arithmetic
2920         types, not just integer types.
2921         * src/SDCCsymt.c (addSymChain): clarified error message when symbol is
2922         multiply defined with mismatching "at" address.
2923
2924 2003-12-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2925
2926         * src/ds390/main.c (PORT tininative_port): fixed bug #858416
2927         * src/SDCCglue.c (printChar, printIvalChar, emitStaticSeg),
2928         * src/SDCCast.c (createIvalCharPtr, stringToSymbol): handle strings
2929         with embedded nulls (fixed bug #753752)
2930
2931 2003-12-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2932
2933         * src/mcs51/main.c(_mcs51_genRAMCLEAR): using r0 instead of r1/r2.
2934         Apparently this did not see much testing (endless loop)
2935
2936 2003-12-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2937
2938         * src/z80/ralloc.c: set DISABLE_PACK_HL = 1 as a temporary fix to bug #855165
2939
2940 2003-12-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2941
2942         * src/SDCCdebug.c (outputDebugSymbols, outputDebugStackSymbols, dumpSymInfo):
2943         gracefully handle NULL memmap pointers
2944
2945 2003-12-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2946
2947         * src/SDCCopt.c (killDeadCode): change iCode type to DUMMY_READ_VOLATILE
2948         instead of deleting the iCode when an operand is volatile
2949         * src/z80/gen.c (genDummyRead),
2950         * src/mcs51/gen.c (genDummyRead),
2951         * src/ds390/gen.c (genDummyRead),
2952         * src/hc08/gen.c (genDummyRead): handle operands in IC_LEFT and/or IC_RIGHT,
2953         not just IC_RIGHT
2954         * src/SDCCicode.c (geniCodeCall): fixed bug #851607
2955         * src/SDCC.y: fixed bug #850420
2956
2957 2003-12-05 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2958
2959         Applied z80 i/o port patch from Peter Townson and fixed some operators
2960         to better handle operands in A register.
2961         * device/include/z180.h
2962         * src/SDCC.y
2963         * src/SDCCglue.c
2964         * src/z80/gen.c
2965         * src/z80/gen.h
2966         * src/z80/main.c
2967         * src/z80/peeph-z80.def
2968         * src/z80/peeph.def
2969         * src/z80/z80.h
2970
2971 2003-12-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2972
2973         * src/SDCCsymt.c (addSymChain, compareTypeExact): fixed bug #838241 again
2974
2975 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2976
2977         * device/lib/hc08/_mullong.c: Removed extra #endif
2978
2979 2003-12-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2980
2981         * sim/ucsim/hc08.src/inst.cc,
2982         * sim/ucsim/hc08.src/hc08mac.h: fixed some problems with CC flag bits and
2983         carries from x to h
2984         * src/hc08/gen.c (aopAdrStr): fixed problem with 16 bit immediate
2985         * src/hc08/gen.c (XAccRsh): fixed problem with right shift
2986         * device/include/stdarg.h: fixed varargs for hc08
2987         * device/lib/Makefile.in,
2988         * device/lib/hc08/Makefile,
2989         * device/lib/hc08/_mulint.c,
2990         * device/lib/hc08/_mullong.c: fixed some endian problems
2991
2992 2003-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2993
2994         * sdcc/src/mcs51/gen.c (genMultOneByte): help peephole 105
2995         * sdcc/src/mcs51/peeph.def: added peephole 186.e array access in code space
2996         * device/lib/_gptrget.c,
2997         * device/lib/_gptrput.c: P2 not used any more (related to #850747, #785979)
2998
2999 2003-11-27 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3000
3001         * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
3002         * src/SDCCast.c (astErrors): fixed bug #846007
3003         * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
3004
3005 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3006
3007         * src/SDCCast.c (decorateType): disabled a transformation I added in
3008         revision 1.188 (access to fields of a structure at an absolute address);
3009         it breaks with bitfields, extern declarations, and gcse analysis.
3010         * src/SDCCopt.c (isLocalWithoutDef): if ADDRESS_OF applied to a symbol, it
3011         could be assigned through a pointer, so don't complain.
3012         * src/SDCCast.c (astErrors),
3013         * src/SDCCast.h,
3014         * src/SDCCglue.c (emitRegularMap): fixed bug #847813
3015
3016 2003-11-26 Vangelis Rokas <vrokas AT otenet.gr>
3017
3018         * src/pic16/main.c (_pic16_genIVT): fixed interrupt vector table
3019         * src/pic16/main.c (_pic16_genAssemblerPreamble): re-enabled the
3020         output of __config directives, since gpasm now supports them
3021         * src/pic16/main.c (_pic16_finaliseOptions): define MCU
3022         pre-processor macro, i.e. -DMCU=p18f452
3023         * src/pic16/ralloc.c: renamed packRegisters to pic16_packRegisters,
3024         and modified to handle 'cast' icode similarly to '=' icode
3025         * src/pic16/device.h (typedef struct PIC_device): added field
3026         'extMIface' to indicate that chip has external memory interface
3027         * src/pic16/device.c: added chips 18F248, 18F258, 18F448, 18F458,
3028         18F6520, 18F6620, 18F6680, 18F6720, 18F8520, 18F8620, 18F8680,
3029         18F8720
3030
3031 2003-11-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3032
3033         * src/SDCC.y (pointer): fixed bug #846006
3034         * support/Util/SDCCerr.c: made W_PTR_TYPE_INVALID message clearer
3035         * src/SDCCast.c (decorateType): fixed bug #846009
3036         * src/ds390/peeph.def,
3037         * src/ds390/gen.c (genAnd, genOr),
3038         * src/mcs51/peeph.def,
3039         * src/mcs51/gen.c (genAnd, genOr): fixed bug #846777
3040
3041 2003-11-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3042
3043         Fixed several common-sub-expression bugs (#772861, #768380, & #755323)
3044         * src/SDCCdflow.c
3045         * src/SDCCcse.c
3046         * src/SDCCcse.h
3047         * src/SDCCBBlock.h
3048         * src/SDCCBBlock.c
3049
3050 2003-11-23 Klaus Flittner <klaus_flittner AT gmx.de>
3051
3052         fixed bug #845089
3053         * src/SDCCbitv.h,
3054         * src/SDCCbitv.c: added function to free a bitvector
3055         * src/SDCClrange.h,
3056         * src/SDCClrange.c: added function to recompute the liveranges
3057         * src/avr/ralloc.c,
3058         * src/ds390/ralloc.c,
3059         * src/hc08/ralloc.c,
3060         * src/mcs51/ralloc.c,
3061         * src/pic/ralloc.c,
3062         * src/pic16/ralloc.c,
3063         * src/xa51/ralloc.c,
3064         * src/z80/ralloc.c: recompute the liveranges after register packing
3065
3066 2003-11-21 Klaus Flittner <klaus_flittner AT gmx.de>
3067
3068         * src/SDCCloop.c (newInduction): fixed bug #845630
3069
3070 2003-11-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3071
3072         * src/SDCCsymt.c (compareTypesExact): disabled debugging output
3073         inadvertantly left behind from my 2003-11-12 change
3074
3075 2003-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3076
3077         Updated headers I neglected to commit yesterday.
3078         * src/SDCClrange.h,
3079         * src/SDCCicode.h
3080
3081 2003-11-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3082
3083         * src/SDCCcse.c (algebraicOpts): fixed bug #773153
3084         * src/SDCClrange.c (rlivePoint): need to mark IC_RESULT used if POINTER_SET op
3085         * src/SDCCopt.c (eBBlockFromiCode),
3086         * src/SDCClrange.c (hashiCodeKeys, sequenceiCode, computeLiveRanges): seperated
3087         the creation of the key hash table from the sequencing so it can be used
3088         earlier (for some GCSE bug fixes still pending)
3089
3090 2003-11-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3091
3092         * src/mcs51/gen.c (genPlus): generate shortcut for adding 0xab00
3093         * support/regression/tests/addsub.c: testing genPlus shortcut
3094
3095 2003-11-15  Borut Razem <borut.razem AT siol.net>
3096
3097         * src/SDCCmain.c: fixed bug #841645: -MM command line option passed to sdcpp
3098
3099 2003-11-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3100
3101         * src/SDCCcse.c (cseBBlock): fixed bug #527779
3102         * src/SDCCcse.c (deleteGetPointers): rewrote so that the set
3103         ordering is immaterial.
3104         * src/SDCCdflow.c (mergeInExprs): fixed bug #587536
3105
3106 2003-11-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3107
3108         * src/SDCCicode.c (geniCodeAddressOf): fixed part of bug #840381
3109         * src/SDCCopt.c (replaceRegEqv, isLocalWithoutDef): fixed other part
3110         (SIGSEV) of bug #840381
3111         * src/SDCCmain.c (linkEdit, assemble): fixed bug #841606 (don't
3112         unlink new file before rename if new and old filenames are the same)
3113
3114 2003-11-13 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3115
3116         * src/mcs51/main.c: started fixing bug #737001 (SDCC not clearing
3117         uninitialized variables) for the mcs51. Set environment variable
3118         SDCC_GENRAMCLEAR to test.
3119         xdata initialization slightly shorter
3120
3121 2003-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3122
3123         * src/SDCCsymt.h,
3124         * src/SDCCsymt.c (addSymTypeChain, compareTypesExact): fixed bugs
3125         #838241 & 780691 (basicly the same bug)
3126         * src/SDCCBBlock.c (iCode2eBBlock): fixed bug #840148
3127         * src/SDCCBBlock.c (iCodeFromeBBlock): fixed bug #840162
3128
3129 2003-11-11 Bernhard Held <bernhard AT bernhardheld.de>
3130
3131         * src/SDCCmain.c (linkEdit): "fix" #834252
3132
3133 2003-11-11 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3134
3135         * src/SDCCast.c (removePostIncDecOps, removePreIncDecOps),
3136         * src/SDCCast.h,
3137         * src/SDCC.y: fixed bug #819403
3138
3139 2003-11-08 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3140
3141         * support/regression/fwk/lib/testfwk.c: printn is recursive and thus needs
3142         the reentrant attribute.
3143         * src/hc08/gen.c (genPackBits): added missing stack readjustment
3144         * sim/ucsim/hc08.src/inst.cc (inst_mov): fixed bugs with mov instruction
3145         simulation
3146         * src/SDCCast.c (decorateType): fixed bug with storage class not being
3147         updated during pointer dereference; f.e. ~(((char *)1)*) was being
3148         erroneously reduced to a literal.
3149         * src/hc08/ralloc.c (packRegisters, rematStr),
3150         * src/hc08/gen.c (aopForRemat): allow literals to be rematerialized in
3151         some cases
3152
3153 2003-11-08 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3154
3155         * src/mcs51/main.c: fixed bug #838385. Thanks to Josef Pavlik for finding and fixing
3156         * doc/sdccman.lyx: changed from 'article' to 'book'
3157         * doc/Makefile: readded test_suite_spec and cdbfileformat
3158
3159 2003-11-08 Bernhard Held <bernhard AT bernhardheld.de>
3160
3161         * device/include/stdlib.h: include malloc.h to comply with ANSI
3162         * support/regression/tests/malloc.c: include stdlib.h instead of malloc.h
3163
3164 2003-11-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3165
3166         * doc/Makefile: sdccman.pdf should build with correct references (more info in commit msg)
3167         * doc/clean.mk: also remove *.out files
3168         * doc/sdccman.lyx: some additions, larger top/bottom margins
3169
3170 2003-11-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3171
3172         * src/SDCC.y: fixed bug #837365
3173         * support/regression/tests/bitopcse.c
3174         * src/hc08/gen.c (genPointerGet): Don't assume pointer operand is
3175         a symbol (might be valop instead)
3176         * device/lib/Makefile.in: added errno.c to HC08SOURCES
3177         * device/lib/clean.mk: added hc08 to the cleaning list
3178
3179 2003-11-04  Borut Razem <borut.razem AT siol.net>
3180
3181         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h: reverted changes,
3182           made 2003-11-04
3183         * support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
3184           as/z80/aslist.c, as/z80/assym.c: removed inclusion of nonstandard malloc.h;
3185           malloc is declared in standard stdlib.h
3186
3187 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3188
3189         * device/lib/hc08/Makefile: need to clean .rel not .o files
3190         * src/hc08/gen.c (genDjnz): can't use djnz with extended addressing mode
3191
3192 2003-11-06 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3193
3194         * src/port.h,
3195         * src/hc08/main.c,
3196         * src/mcs51/main.c,
3197         * src/ds390/main.c,
3198         * src/z80/main.c,
3199         * src/avr/main.c,
3200         * src/pic/main.c,
3201         * src/pic16/main.c,
3202         * src/xa51/main.c: added hasExtBitOp & oclsExpense functions to ports
3203         * src/SDCCicode.c: changed several IS_FARSPACE tests to isOclsExpensive
3204         tests (which uses the port's oclsExpense function)
3205         * src/SDCC.y,
3206         * src/SDCCast.c,
3207         * src/SDCCicode.c,
3208         * src/hc08/gen.c,
3209         * src/ds390/gen.c,
3210         * src/mcs51/gen.c: added support for the SWAP iCode (RFE #834167)
3211
3212 2003-11-04 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3213
3214         * src/SDCCcse.c (ifxOptimize),
3215         * src/SDCClabel.c (labelIfx, deleteIfx): When the condition to
3216         an IFX iCode is volatile, convert to DUMMY_READ_VOLATILE instead
3217         deleting the IFX iCode.
3218         * src/hc08/ralloc.c: reduced unneeded slocs
3219         * src/hc08/gen.c: fixed bug in asmopToBoolean
3220
3221 2003-11-04  Borut Razem <borut.razem AT siol.net>
3222
3223         * configure, configure.in, sdcc_vc_in.h, sdcconf_in.h,
3224           support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
3225           as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
3226           transferred to configure
3227
3228 2003-11-03 Bernhard Held <bernhard AT bernhardheld.de>
3229
3230         Use headers defined in the C[++] standards:
3231         * sim/ucsim/gui.src/serio.src/fileio.cc
3232         * sim/ucsim/gui.src/serio.src/frontend.cc
3233         * sim/ucsim/gui.src/serio.src/main.cc
3234         * sim/ucsim/gui.src/serio.src/posix_signal.cc
3235         * support/Util/NewAlloc.c
3236         * as/hc08/lklibr.c
3237         * as/mcs51/lklibr.c
3238         * as/z80/aslist.c
3239         * as/z80/assym.c
3240
3241 2003-11-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3242
3243         * Added MSVC projects for hc08 assembler and linker:
3244         all.dsp, config.dsp, sdcc.dsw, /as/hc08/as_hc08.dsp,
3245         /as/hc08/link_hc08.dsp
3246
3247 2003-11-03 Martin Helmling <Martin.Helmling AT octo-soft.de>
3248
3249         * debugger/mcs51/cmd.c: allows filename starting with digit(+ some debug)
3250
3251 2003-11-02 Bernhard Held <bernhard AT bernhardheld.de>
3252
3253         * src/SDCCmain.c (linkEdit): "fixed" again bug #833605
3254
3255 2003-11-01 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3256
3257         * src/mcs51/main.c: xdata initialization is 13 bytes shorter now
3258
3259 2003-10-31  Borut Razem <borut.razem AT siol.net>
3260
3261         * support/cpp2/cpplib.h,
3262           support/cpp2/cpplib.c,
3263           support/cpp2/cpplex.c,
3264           support/cpp2/cppinit.c: introduced #pragma preproc_asm [ + | - ]
3265           to switch _asm block preprocessing on / off. Default is
3266           #pragma preproc_asm +
3267
3268 2003-10-31  Borut Razem <borut.razem AT siol.net>
3269
3270         * support/cpp2/cpplex.c: Fixed _WIN32 problem with CR-CR-LF sequences
3271           when outputting comment blocks (when executed with -C option) and
3272           _asm (SDCPP specific) blocks
3273
3274 2003-10-31 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3275
3276         * as/hc08/lkrloc.c (relr): Fixed ihx output, fixed lastAreaIndex warning
3277
3278 2003-10-31 Klaus Flittner <klaus_flittner AT gmx.de>
3279
3280         * src/SDCCcse.c (updateSpillLocation): fixed bug #808027
3281
3282 2003-10-31 Bernhard Held <bernhard AT bernhardheld.de>
3283
3284         * src/SDCCmain.c (linkEdit): "fixed" bug #833605
3285         * src/SDCCast.c (decorateType): fixed bug #832664
3286
3287 2003-10-31  Borut Razem <borut.razem AT siol.net>
3288
3289         * support\cpp2\cpplex.c: fixed for SDCPP:
3290           comments(when executed with -C option) and _asm blocks
3291           were included even if they where in skipped #if block.
3292           Applied solution from GCC cpp 3.3.2
3293
3294 2003-10-31  Borut Razem <borut.razem AT siol.net>
3295
3296         * src/SDCC.lex: sdcc now understands both formats:
3297           '# <line_number> <file_name>' and
3298           '#line <line_number> <file_name>'
3299         * support/cpp2/cppmain.c: sdcpp now generates the standard
3300           '# <line_number> <file_name>' instead of former
3301           '#line <line_number> <file_name>'
3302
3303 2003-10-30  Borut Razem <borut.razem AT siol.net>
3304
3305         * support/cpp2/cpphash.h,
3306         * support/cpp2/cpplib.h
3307         * support/cpp2/cpplex.c,
3308         * support/cpp2/cppmain.c,
3309         * support/cpp2/cppinit.c: fixed bug #828015 - Syntax variation for _asm character constants
3310
3311 2003-10-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3312
3313         Fixed a number of problems revealed by bug #827883.
3314         * src/SDCCloop.c (loopInvariants): Spill location of the
3315         result operand should be recomputed if extracted from
3316         a loop. Also, don't extract assignments of an iTemp
3317         from a literal.
3318         * src/SDCCast.c (isConformingBody): loop reversal should
3319         not occur if the control variable is involved with a
3320         relational operator.
3321
3322 2003-10-28 Bernhard Held <bernhard AT bernhardheld.de>
3323
3324         * .version: bumped to 2.3.6 to reflect the big improvements
3325         made by Erik and Klaus. Thanks!
3326
3327 2003-10-28 Klaus Flittner <klaus_flittner AT gmx.de>
3328
3329         Replaced the livrange code.
3330         * src/SDCClrange.c: added new LR code
3331         * src/SDCCloop.c,
3332         * src/SDCCBBlock.h: removed remainig parts from old LR code
3333         * src/ds390/ralloc.c,
3334         * src/ds390/gen.c: minor fixes to make it work with new code
3335
3336 2003-10-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3337
3338         * as/hc08/asm.h,
3339         * as/hc08/lkrloc.c,
3340         * src/hc08/gen.c,
3341         * src/hc08/ralloc.c: Fix various warnings related to the hc08
3342         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec): Fixed bug #829717
3343         (tweaked fix for bug #818696)
3344
3345 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3346
3347         * src/z80/ralloc.c (joinPushes): Fixed bug #828742
3348
3349 2003-10-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3350
3351         * src/SDCCmain.c,
3352         * sdccconf_in.h: Fixed bug #828387 (--disable-hc08-port didn't work)
3353         * src/mcs51/gen.c (gencjneshort),
3354         * src/ds390/gen.c (gencjneshort): Made comparison with AOP_IMMD operand
3355         more efficient (per Scott Bronson's suggestion)
3356
3357 2003-10-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3358
3359         Extended the semantics of the critical keyword to include
3360         individual statements. See RFE #827755 and #799831
3361         * src/SDCC.y
3362         * src/SDCCicode.c
3363         * src/SDCCopt.c
3364         * src/SDCCast.c
3365         * support/Util/SDCCerr.c
3366         * support/Util/SDCCerr.h
3367         * src/mcs51/gen.c
3368         * src/ds390/gen.c
3369         * src/hc08/gen.c
3370
3371 2003-10-19  Borut Razem <borut.razem AT siol.net>
3372
3373         * src/SDCC.lex: fixed bug #825944 - defined yytext_ptr to make it compile with flex 2.5.31
3374
3375 2003-10-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3376
3377         * src/SDCCicode.c (geniCodePreInc, geniCodePreDec, ast2iCode):
3378         Fixed bug #818696
3379         * src/SDCCast.c (ast_print): Fixed --dumptree so that preincrement
3380         and predecrement operand is displayed
3381
3382 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
3383
3384         * src/SDCCval.c (valMinus): fixed bug #826041
3385
3386 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3387
3388         Some hc08 related updates that I missed earlier
3389         * sim/ucsim/stypes.h
3390         * support/regression/ports/hc08/spec.mk
3391
3392 2003-10-15 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3393
3394         New target "hc08" for the Motorola 68hc08 family of micros
3395
3396         * configure
3397         * configure.in
3398         * Makefile
3399         * src/hc08/*
3400         * src/SDCCmain.c
3401         * src/port.h
3402         * sim/ucsim/hc08.src/*
3403         * sim/ucsim/configure.in
3404         * src/ucsim/configure
3405         * sim/ucsim/packages_in.mk
3406         * as/hc08/*
3407         * as/Makefile
3408         * device/include/mc68hc908qy.h
3409         * device/lib/hc08/*
3410         * device/lib/Makefile.in
3411         * support/regression/ports/hc08/*
3412         * support/regression/Makefile
3413
3414 2003-10-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3415
3416         * src/z80/gen.c: fixed bug revealed by ast_constant_folding.c
3417         regression test
3418         * src/ds390/gen.c (genCast): fixed bug #821957
3419
3420 2003-10-13 Bernhard Held <bernhard AT bernhardheld.de>
3421
3422         * device/lib/logf.c: "fixed" overlay bug
3423         * support/regression/ports/host/spec.mk: added m library
3424         * support/regression/ports/mcs51-stack-auto/spec.mk: added float funcs
3425         * support/regression/tests/float_trans: added (for Eric)
3426
3427 2003-10-12 Bernhard Held <bernhard AT bernhardheld.de>
3428
3429         * src/mcs51/gen.c (genCpl): fixed bug
3430         http://sf.net/mailarchive/message.php?msg_id=6263915
3431
3432 2003-10-10 Bernhard Held <bernhard AT bernhardheld.de>
3433
3434         * src/SDCCast.c (decorateType): added extended constant folding
3435         * src/SDCCsymt.c (computeType): cleanup
3436         * src/SDCCval.c (valShift): minor optimization
3437         * support/regression/tests/ast_constant_folding.c: added
3438
3439 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3440
3441         * src/SDCCmain.c: removed some unintended changes
3442
3443 2003-10-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3444
3445         * src/SDCCmain.c (setParseWithComma): fixed bug #816685
3446         * src/z80/gen.c: fixed part of bug #817589
3447         * src/SDCCsymt.c (checkFunction): fixed bug #817895
3448
3449 2003-10-08 Bernhard Held <bernhard AT bernhardheld.de>
3450
3451         Replaced cast (void **) with (void *) to avoid gcc 3 warning:
3452         * src/SDCCcflow.c
3453         * src/SDCCcse.c
3454         * src/SDCCdflow.c
3455         * src/SDCClabel.c
3456         * src/SDCClrange.c
3457         * src/SDCCmem.c
3458         * src/SDCCopt.c
3459         * src/SDCCpeeph.c
3460         * src/SDCCset.c
3461         * src/avr/ralloc.c
3462         * src/ds390/ralloc.c
3463         * src/izt/ralloc.c
3464         * src/mcs51/ralloc.c
3465         * src/pic/ralloc.c
3466         * src/pic16/ralloc.c
3467         * src/xa51/ralloc.c
3468         * src/z80/ralloc.c
3469         * src/z80/gen.c: removed unused label "release:"
3470
3471 2003-10-06  Borut Razem <borut.razem AT siol.net>
3472
3473         * src/SDCC.lex: removed definition of unused variables
3474           save_optimize and save_options
3475
3476 2003-10-06 Bernhard Held <bernhard AT bernhardheld.de>
3477
3478         * clean.mk: removed '=' in "-maxdepth=1"
3479         * src/SDCCloop.c: replace LRKLAUS with SDCC_LRKLAUS
3480         * src/SDCClrange.c: replace LRKLAUS with SDCC_LRKLAUS
3481
3482 2003-10-06  Borut Razem <borut.razem AT siol.net>
3483
3484         * src/SDCC.lex, src/SDCC.lex: use dbuf for "_asm" definitions;
3485           my_unput() replaced by unput()
3486
3487 2003-10-05 Bernhard Held <bernhard AT bernhardheld.de>
3488
3489         * src/SDCCloop.c (assignmentsToSym, loopInduction): cast argument of
3490         setToNull() to (void *) to avoid gcc3.x's warning: "dereferencing
3491         type-punned pointer will break strict-aliasing rules"
3492         Old LR behaviour is again default; Klaus' LR can be choosen by
3493         defining the environment variable LRKLAUS
3494         * src/SDCCBBlock.h
3495         * src/SDCCloop.c
3496         * src/SDCClrange.c
3497         * src/ds390/ralloc.c (spillThis): applied Klaus' patch
3498         * clean.mk: fixed removal of files in bin/CVS/
3499         * device/lib/clean.mk: fixed removal of directories small and large
3500         * support/Util/SDCCerr.c: changed W_INT_OVL to ERROR_LEVEL_PEDANTIC
3501         * src/SDCCicode.c,
3502         * src/SDCCval.c: removed superflous test for pedantic
3503
3504 2003-10-05  Borut Razem <borut.razem AT siol.net>
3505
3506         * src/SDCC.lex, support/Util/SDCCerr.c, sdcc/support/Util/SDCCerr.h:
3507           Fixed bug #816692: introduced new ERROR_LEVEL_PEDANTIC warning
3508           message "unmatched #pragma SAVE and #pragma RESTORE"
3509
3510 2003-10-04  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3511
3512         * doc/sdccman.lyx: various additions and updates (interrupts, inline
3513           assembly, critical functions, atomic, nojtbound)
3514
3515 2003-10-04 Bernhard Held <bernhard AT bernhardheld.de>
3516
3517         Applied liferange patch from Klaus Flittner <klaus_flittner AT gmx.de>
3518         * src/SDCCBBlock.h
3519         * src/SDCCloop.c
3520         * src/SDCCloop.h
3521         * src/SDCClrange.c
3522
3523 2003-10-03  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3524
3525         * src/z80/gen.h,
3526         * src/z80/gen.c (aopOp, aopGet, aopPut, genDummyRead),
3527         * src/mcs51/gen.h
3528         * src/mcs51/gen.c (aopOp, aopGet, aopPut, genDummyRead),
3529         * src/ds390/gen.h
3530         * src/ds390/gen.c (aopOp, aopGet, aopPut, genDummyRead),
3531         * src/SDCCicode.c (ast2iCode, geniCodeDummyRead): Fixed bug #663539
3532         * src/SDCCopt.c (killDeadCode): Fixed bugs #663539 & #816705
3533
3534 2003-10-02  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3535
3536         * src/z80/gen.c (genRet): fixed bug #524753
3537         * src/z80/gen.c (genCast): fixed internal error on cast from
3538         pointer to long
3539         * src/z80/gen.c (_saveRegsForCall, emitCall): adapted Johan's
3540         fix for bug #477835 to the z80
3541         * src/z80/gen.c (genZ80code, _vemit2, _emit2): added support
3542         for tracking iCodes in the peephole optimizer for z80
3543
3544 2003-10-01  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3545
3546         * src/SDCCicode.c (geniCodeJumpTable, geniCodeSwitch): fixed
3547         the other part of bug #814548
3548         * src/SDCCpeeph.c (labelInRange): fixed bug #814558
3549
3550 2003-09-30  Bernhard Held <bernhard AT bernhardheld.de>
3551
3552         * src/SDCCcse.c: fixed part of bug #814548
3553
3554 2003-09-28  Borut Razem <borut.razem AT siol.net>
3555
3556         * src/asm.c: rewrite of printILine() to use temporary file instead
3557           a pipe
3558         * src/xa51/main.c: commented out declaration of int rewinds
3559
3560 2003-09-27  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3561
3562         * src/SDCCicode.c (geniCodeJumpTable): Fixed bug #813206
3563
3564 2003-09-26  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3565
3566         * src/SDCCdflow.c (computeDataFlow): Fixed bug #810746
3567         * src/asm.c (printILine): Fixed bug #811015
3568
3569 2003-09-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3570
3571         *link/z80/lklibr.c, as/mcs51/lklibr.c: Improved memory allocation and
3572         freeing.
3573
3574 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3575
3576         * src/z80/gen.c (setupToPreserveCarry): Fixed bug #796955
3577         * src/z80/gen.c (setupPair, genMovePairPair): Fixed setupPair
3578         to correctly handle general case of AOP_PAIRPTR
3579         * src/z80/gen.c (aopGet, aopPut): Generalized AOP_PAIRPTR handling
3580
3581 2003-09-21  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3582
3583         * src/mcs51/ralloc.c (fillGaps),
3584         * src/ds390/ralloc.c (fillGaps): fixed bug #810093 (yet another
3585         register positioning bug)
3586
3587 2003-09-21  Bernhard Held <bernhard AT bernhardheld.de>
3588
3589         * device/lib/_fsdiv.c: replaced (1<<31) by (1ul<<31)
3590
3591 2003-09-19  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3592
3593         * src/mcs51/gen.c (loadDptrFromOperand, genFarPointerGet,
3594         genCodePointerGet, genGenPointerGet, genFarPointerSet,
3595         genGenPointerSet): handle AOP_DPTR correctly when loading dptr
3596         (ralloc doesn't intentionally do this now, but perhaps later)
3597         * src/mcs51/ralloc.c (serialRegAssign, fillGaps),
3598         * src/ds390/ralloc.c (serialRegAssign, fillGaps): fixed some
3599         register positioning bugs (Fixed bug #762602 and #795325)
3600         * src/SDCCicode.c (geniCodeDerefPtr): Track output class correctly
3601         (Fixed bug #808779)
3602         * src/z80/gen.c: increased _vemit2's buffer[] to handle long
3603         lines that --i-code-in-asm generates
3604
3605 2003-09-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3606
3607         *link/z80/lklibr.c, as/mcs51/lklibr.c: Fixed Linux segfaults when
3608         trying to fclose a FILE* that was already closed.
3609
3610 2003-09-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3611
3612         * src/SDCCsymt.c (structElemType): fixed bug #808291 (members
3613         of const struct should be treated as if const themselves)
3614
3615 2003-09-18  Bernhard Held <bernhard AT bernhardheld.de>
3616
3617         * src/SDCCval.c (valPlus, valMinus): fixed bug #808337
3618
3619 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3620
3621         * support/librarian/sdcclib.c: Generate correct offsets for libraries with
3622         Unix (/n) and DOS (/r/n) line terminations.
3623
3624 2003-09-17  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3625
3626         * src/SDCCopt.c (cnvFromFloatCast, cnvToFloatCast): fixed
3627         bug #613775
3628
3629 2003-09-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3630
3631         * src/mcs51/gen.c (genFunction, genEndFunction),
3632         * src/ds390/gen.c (genFunction, genEndFunction): Moved save
3633         and restore of EA so that stack offsets to parameters are
3634         correct when using both critical and reentrant/stack-auto.
3635         * src/z80/gen.c (aopOp): removed erroneous assertion about sloc
3636         size (can be triggered in error if sloc is shared between
3637         different sized objects)
3638         * device/include/float.h: fixed macros to explicitly use
3639         unsigned long where needed
3640
3641 2003-09-15  Bernhard Held <bernhard AT bernhardheld.de>
3642
3643         Feature req. 799831: added code to allow nesting of critical functions
3644         * src/mcs51/gen.c (genFunction, genEndFunction)
3645         * src/ds390/gen.c (genFunction, genEndFunction)
3646
3647 2003-09-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3648
3649         * src/SDCCsymt.c (sclsFromPtr),
3650         * src/SDCCsymt.h,
3651         * src/SDCCast.c (decorateType): fixed bug #462971. Also, better
3652         support for standard C idiom of memory mapped variables; for
3653         example, *((xdata int*)0x1234) = 1 is now internally equivalent
3654         to xdata int at 0x1234 tempvar = 1.
3655         * sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
3656         provided by Akiya ISHIDA
3657
3658 2003-09-13  Bernhard Held <bernhard AT bernhardheld.de>
3659
3660         * src/SDCCval.c (cheapestVal): reenabled to reduce int to char
3661         * src/SDCCval.c (constVal): added reduction from int to char
3662         * src/SDCCval.c (valMult, valDiv): fixed sign handling
3663         * src/SDCCval.c (valShift): fixed after change of cheapestVal()
3664         * src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have
3665         to ignore the sign
3666         * support/regression/tests/shifts.c: fixed
3667
3668 2003-09-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3669
3670         * src/z80/gen.c (genXor): Fixed bug #805445
3671
3672 2003-09-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3673
3674         Fixed bug #621531 (const & volatile confusion in the type chain).
3675         DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
3676         refer to the const or volatile state of the pointer itself.
3677
3678         * src/SDCCast.c
3679         * src/SDCCglue.c
3680         * src/SDCCicode.c
3681         * src/SDCCsymt.c
3682         * src/SDCCval.c
3683         * src/SDCC.y
3684         * src/SDCCsymt.h
3685         * src/pic/gen.c
3686         * src/pic/ralloc.c
3687         * src/pic16/gen.c
3688         * src/pic16/ralloc.c
3689         * support/regression/tests/const.c
3690
3691 2003-09-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3692
3693         When checking for duplicated modules, use absolute paths
3694         instead of relative paths.  Files changed:
3695
3696         * as/mcs51/lklib.c
3697         * link/z80/lklib.c
3698
3699 2003-09-09  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3700
3701         * src/SDCCicode.c (geniCodeLogic): fixed bug #797572
3702
3703 2003-09-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3704
3705         * device/include/string.h: added size_t typedef, changed
3706         prototypes to use size_t, eliminated separate reentrant and
3707         non-reentrant declarations, added _memmove declaration
3708         * device/lib/_memcpy.c: changed to use size_t instead of int,
3709         changed /4 to >>2 to avoid division library call
3710         * device/lib/_memcmp.c,
3711         * device/lib/_memset.c,
3712         * device/lib/_strncat.c,
3713         * device/lib/_strncpy.c,
3714         * device/lib/_strncmp.c: changed to use size_t instead of int
3715         * device/lib/_memmove.c: new file (fixed bug #772294)
3716         * device/lib/Makefile.in: added _memmove.c
3717         * device/lib/z80/asm_strings.s: fixed bug #772290
3718         * support/regression/tests/bitfields.c: attempt to fix host assertion
3719         failure on amd64-unknown-linux2.2
3720
3721 2003-09-06  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3722
3723         * src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
3724         * src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700
3725         * as/z80/asmain.c (main): fixed bug #801766
3726
3727 2003-09-06  Bernhard Held <bernhard AT bernhardheld.de>
3728
3729         * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
3730         compilers
3731
3732 2003-09-05  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3733
3734         * src/SDCCast.c (isConformingBody): fixed loop reversal bug
3735         reported in bug #800609
3736
3737 2003-09-04  Vangelis Rokas <vrokas AT otenet.gr>
3738
3739         * Top header beautifications in src/pic16 directory:
3740           device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
3741           pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
3742           pcoderegs.h, ralloc.c, ralloc.h
3743         * main.c: added top header and GPL license notice
3744         * pcode.c: fixed the if-conditional warning
3745
3746 2003-09-04  Bernhard Held <bernhard AT bernhardheld.de>
3747
3748         * device/lib/_mullong.c: replaced int by short for gcc
3749
3750 2003-08-31  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3751
3752         * src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
3753         and JUMPTABLE iCodes properly now (worked by accident before)
3754         * src/mcs51/gen.c (leftRightUseAcc),
3755         * src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
3756         iCode properly now. Use getSize instead of nRegs since a & b
3757         aren't part of the nRegs tally.
3758
3759 2003-08-31  Vangelis Rokas <vrokas AT otenet.gr>
3760
3761         * src/pic16/main.c: corrected offsets of interrupt vectors in _pic16_genIVT()
3762         * src/pic16/pcode.c: fix to disable inserting BANKSEL directive
3763           before instructions that use the _STATUS register
3764
3765 2003-08-31  Bernhard Held <bernhard AT bernhardheld.de>
3766
3767         * src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
3768         * src/mcs51/gen.c (genNearPointerSet): added missing opcode for
3769         fetching of the pointer
3770         * src/mcs51/gen.c (genNearPointerGet): added reuse of PREG,
3771         copied from genNearPointerSet()
3772         * src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
3773         * src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls.
3774         If they pop r0/r1 they must be called in the opposite order than aopOp().
3775         * device/lib/_mullong.c: fixed for "--model-large --int-long-reent"
3776         (resp. --stack-auto), prepared for --xstack
3777
3778 2003-08-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3779
3780         * doc/sdccman.lyx: reverted tables to those in cvs 1.64
3781
3782 2003-08-28  Bernhard Held <bernhard AT bernhardheld.de>
3783
3784         * device/lib/_startup.c: quick & dirty fix for ds390/ds400;
3785         these ports have their own __sdcc_external_start()
3786
3787 2003-08-26  Bernhard Held <bernhard AT bernhardheld.de>
3788
3789         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
3790         * src/pic/glue.c (pic14printPublics): fixed bug introduced when symbol
3791         type for bits was changed. It resulted in bit variables becoming
3792         global, which is not permitted in PIC 14 assembly output.
3793
3794 2003-08-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3795
3796         * doc/sdccman.lyx: various additions and updates. Rearranged sections
3797
3798 2003-08-22  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
3799
3800         Z80 and MCS51 linkers complaint if a public symbol is defined
3801         in more than one library module:
3802
3803         * as/mcs51/lklib.c
3804         * link/z80/lklib.c
3805         * as/mcs51/Makefile.in
3806
3807 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3808
3809         A few small changes that speed up the peephole optimizer.
3810
3811         * src/SDCCpeeph.c
3812
3813 2003-08-22  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3814
3815         Try to make the peephole optimizer smarter by maintaining
3816         an association between the assembly source code and the
3817         iCodes that originated them. Put this information to use
3818         with a new peephole rule condition "notVolatile" so that
3819         the rules can be aggressive yet still safe.
3820
3821         * src/SDCCpeeph.c
3822         * src/SDCCpeeph.h
3823         * src/mcs51/gen.c
3824         * src/mcs51/peeph.def
3825
3826 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3827
3828         Fixed bug #741761
3829
3830         * src/mcs51/gen.c (aopForSym, leftRightUseAcc),
3831         * src/ds390/gen.c (aopForSym, leftRightUseAcc): preserve A and B
3832         if the left or right operand symbols have the accuse flag set.
3833
3834 2003-08-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3835
3836         Changed the type of the result of the ! (NOT) operator to char;
3837         previously it returned the same type as the source. This allows
3838         us to eliminate all the genFloatNot functions (all of its target
3839         implementations were very buggy) since !float can use the same
3840         code as !long now.
3841
3842         * src/SDCCicode.c (ast2iCode): ! returns char
3843         * src/mcs51/gen.c (genNot, genNotFloat),
3844         * src/ds390/gen.c (genNot, genNotFloat),
3845         * src/z80/gen.c (genNot, genNotFloat),
3846         * src/pic/gen.c (genNot, genNotFloat),
3847         * src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat
3848
3849 2003-08-19  Bernhard Held <bernhard AT bernhardheld.de>
3850
3851         pic patch provided by Slade Rich <slade_rich AT yahoo.com>
3852         1. Interrupt would not compile properly. Ensure PCLATH register is saved
3853            during interrupts. Ensure WSAVE is located at a shared bank address.
3854         2. Fixed page selection in some places
3855         3. Fixed BTFSS/C to where necessary use registers directly and not simply
3856            the registers name strings.
3857         4. Fixed "signed / unsigned compare" compiler warnings.
3858         5. The PIC port manages its own allocation of the general purpose
3859            registers, but makes no attempt to reuse them. As a result when
3860            compiling it soon runs out of general purpose registers. Some
3861            additional code was added to the files pcode.c and device.c to walk
3862            through the function call tree and rename the registers so that they
3863            get reused.
3864
3865         * src/pic/device.c
3866         * src/pic/gen.c
3867         * src/pic/glue.c
3868         * src/pic/pcode.c
3869         * src/pic/pcode.h
3870         * src/pic/ralloc.c
3871         * src/pic/ralloc.h
3872         * src/pic/genarith.c: Fixed problems with PIC 14 port in functions
3873         genPlus() & genMinus() when the result is the same as left or right
3874
3875 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3876
3877         * src/z80/gen.c (isUnsplitable, fetchPairLong): fixed bug #770454
3878
3879 2003-08-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3880
3881         Made bitfield a distinct type from bit so that bitfields
3882         convert as per ANSI C and bits retain their traditional
3883         boolean style behaviour. Implemented bitfield support in
3884         the z80 port.
3885
3886         * src/SDCCsymt.h,
3887         * src/SDCCsymt.c,
3888         * src/SDCCast.c,
3889         * src/cdbFile.c,
3890         * src/mcs51/gen.c,
3891         * src/ds390/gen.c: bit v bitfield split
3892         * src/z80/gen.c: New support for bitfields
3893         * support/regression/tests/bitfields.c: reenabled z80,
3894         added more tests
3895
3896 2003-08-17  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3897
3898         Rules 246.x, 247.x relate to bitfields, the others speed up
3899         access to xdata mapped I/O devices.
3900
3901         * src/mcs51/peeph.def: added 26 peepholes 246.x - 248.x, 180.x
3902
3903 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3904
3905         Cleaned up genPackBits and genUnpackBits and added two helper
3906         functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
3907         for literal assignments in genPackBits (thanks to Frieder for
3908         reminding me).
3909
3910         * src/mcs51/gen.c
3911         * src/ds390/gen.c
3912
3913 2003-08-16  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3914
3915         Fixed bug #748310 (pointer to function type mishandled when the
3916         function name is omitted). Also fixed a SIGSEGV when a function
3917         attribute (reentrant, etc) is used on a non-function or on a
3918         function but misplaced before the parameter list.
3919
3920         * src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
3921         bug #748310
3922         * src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
3923         * support/Util/SDCCerr.h,
3924         * support/Util/SDCCerr.c: Added func attr misuse error msg
3925
3926 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
3927
3928         Fixed bug #787649 by anonymous
3929         * src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
3930         * src/ds390/gen.c (aopForSym): fixed func ptr in sloc
3931
3932 2003-08-14  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3933
3934         Fixed numerous bitfield problems.
3935
3936         * src/SDCC.y: More bitfield related error checking
3937         * src/SDCCsymt.h,
3938         * src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
3939         * support/Util/SDCCerr.h,
3940         * support/Util/SDCCerr.c: Added & edited some bitfield err msgs
3941         * src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
3942         * src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
3943         * support/regression/tests/bitfields.c: tests added
3944
3945 2003-08-13  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3946
3947         Made the constant following the "interrupt" keyword optional. If
3948         omitted, the function will not automatically be given an entry
3949         in the interrupt vector table (similar to #pragma NOIV, but
3950         less syntacticly kludgy). The interrupt number is also now
3951         range checked. Also fixed a bug in the high order bit example
3952         in the manual.
3953
3954         * src/SDCC.y
3955         * src/SDCCmem.c
3956         * src/SDCCglue.c
3957         * src/SDCCsymt.h
3958         * support/Util/SDCCerr.c
3959         * support/Util/SDCCerr.h
3960         * doc/sdccman.lyx
3961
3962 2003-08-13  Bernhard Held <bernhard AT bernhardheld.de>
3963
3964         * src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
3965         * src/SDCCicode.c (operandOperation): rewritten some ops
3966         (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
3967         * src/SDCCsymt.c (computeType): literals are handled the same way as any
3968         other type
3969         * src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can
3970         be re-activated by defining REDUCE_LITERALS)
3971         * src/SDCCval.c (constVal): fixed; hex and octal constants can be
3972         unsigned, but are signed by default
3973         * src/SDCCval.c (constVal): rearranged
3974         * src/SDCCval.c (valMod): preliminary fix
3975         * src/SDCCval.c (valCastLiteral): use TYPE_* types
3976         * support/regression/literalop.c: added, work in progress
3977
3978 2003-08-12  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3979
3980         Generate warnings for useless declarations like "char data;"
3981         that don't do what new users expect.
3982
3983         * src/SDCC.y
3984         * support/Util/SDCCerr.h
3985         * support/Util/SDCCerr.c
3986
3987 2003-08-09  Bernhard Held <bernhard AT bernhardheld.de>
3988
3989         * src/SDCCval.c (valMult): fix overflow detection of negative int
3990
3991 2003-08-07  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3992
3993         * src/z80/ralloc.c (joinPushes): made compatible with new signedness
3994
3995         Changes to support big endian targets:
3996
3997         * src/ports.h
3998         * src/SDCCglue.c
3999         * src/avr/main.c
4000         * src/ds390/main.c
4001         * src/izt/i186.c
4002         * src/mcs51/main.c
4003         * src/pic/main.c
4004         * src/pic16/main.c
4005         * src/xa51/main.c
4006         * src/z80/main.c
4007
4008 2003-08-06  Bernhard Held <bernhard AT bernhardheld.de>
4009
4010         * src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
4011         * device/lib/time.c: fixed warning "integer overflow in expression"
4012
4013 2003-08-05  Bernhard Held <bernhard AT bernhardheld.de>
4014
4015         * src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
4016         * src/SDCCval.c (constVal): changed default to signed; hex and octal
4017         constants are unsigned; added recognition of "u" flag for unsigned
4018         * src/SDCCval.c (valMult): fixed signdness, added warning for overflow
4019         * src/SDCCval.c (valDiv, valMod): fixed signdness
4020         * src/SDCCicode.c (operandOperation): fixed critical typo; fixed
4021         signedness of modulo, left and right shift
4022         * support/Util/SDCCerr.c: added warning "integer overflow in expression"
4023         * support/Util/SDCCerr.h: added warning W_INT_OVL
4024         * src/SDCCast.c (decorateType): fixed gcc3.3 warning
4025         * src/SDCCast.c (ast_print): improved output of constants
4026
4027 2003-08-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4028
4029         Fixed some warnings when building with MSVC:
4030
4031         * as\mcs51\asdata.c
4032         * as\z80\asdata.c
4033         * as\mcs51\asm.h
4034         * as\z80\asm.h
4035         * link\z80\aslink.h
4036         * link\z80\lkdata.c
4037         * link\z80\lkeval.c
4038         * link\z80\lkgb.c
4039         * link\z80\lkihx.c
4040         * link\z80\lks19.c
4041         * link\z80\lksym.c
4042         * support\cpp2\cpplib.c
4043         * src\ds390\gen.c
4044         * src\mcs51\gen.c
4045
4046 2003-08-03  Bernhard Held <bernhard AT bernhardheld.de>
4047
4048         * src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth AT isi.edu>
4049
4050 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4051
4052         * support\librarian\clean.mk: Do not remove Makefile.
4053         * support\librarian\Makefile: added.
4054
4055 2003-08-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4056
4057         Added librarian to MSVC build:
4058         * all.dsp
4059         * sdcc.dsw
4060         * support\librarian\librarian.dsp
4061
4062         'configure' not needed for librarian, removed:
4063         * support\librarian\configure
4064         * support\librarian\configure.in
4065         * support\librarian\config_in.h
4066         * support\librarian\Makefile.in
4067
4068         Hopefully these ones built the librarian and the rest of sdcc properly:
4069         * Makefile
4070         * Makefile.common.in
4071
4072         Messed up 'configure', so revert to previous version:
4073         * configure
4074         * configure.in
4075
4076 2003-07-31  Bernhard Held <bernhard AT bernhardheld.de>
4077
4078         * src/SDCCicode.c (operandOperation): 3. fix, this time for Alpha; ULONG has 64 bits
4079         there, while the mantissa of a double is "only" 53 bits wide.
4080
4081 2003-07-31  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4082
4083         Adding sdcclib to the build.  MSVC project coming soon.
4084         Files added/changed:
4085
4086         * support\librarian\clean.mk
4087         * support\librarian\configure
4088         * support\librarian\configure.in
4089         * support\librarian\config_in.h
4090         * support\librarian\Makefile.bcc
4091         * support\librarian\Makefile.in
4092         * support\librarian\sdcclib.c
4093         * Makefile.bcc
4094         * Makefile
4095         * Makefile.common.in
4096         * configure
4097         * configure.in
4098
4099 2003-07-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4100
4101         Linker now complaints if linked modules have conflicting options, for
4102         example, one compiled using --model-large and another one compiled with
4103         --model-small.  The following files were modified:
4104
4105         * as\mcs51\asdata.c
4106         * as\mcs51\aslink.h
4107         * as\mcs51\asm.h
4108         * as\mcs51\asmain.c
4109         * as\mcs51\asout.c
4110         * as\mcs51\i51pst.c
4111         * as\mcs51\lkdata.c
4112         * as\mcs51\lklibr.c
4113         * as\mcs51\lkmain.c
4114         * as\z80\asdata.c
4115         * as\z80\asm.h
4116         * as\z80\asmain.c
4117         * as\z80\asout.c
4118         * as\z80\z80pst.c
4119         * link\z80\aslink.h
4120         * link\z80\lkdata.c
4121         * link\z80\lklibr.c
4122         * link\z80\lkmain.c
4123         * src\SDCCglue.c
4124
4125 2003-07-28  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4126
4127         *link/z80/aslink.h, link/z80/lklibr.c, as/mcs51/aslink.h,
4128         as/mcs51/lklibr.c: Generate a warning when a library is not found.
4129
4130 2003-07-28  Bernhard Held <bernhard AT bernhardheld.de>
4131
4132         * src/z80/mappings.i: fix _mul[us][int,long] entries
4133
4134 2003-07-26  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4135
4136         *src/SDCCmain.c: do not search for crt0.o when using --nostdlib
4137
4138 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
4139
4140         * src/SDCCicode.c (operandOperation): really fixed problem with bitops
4141         * support/regression/tests/bitopcse.c: added
4142         fixed warning:
4143         * src/avr/gen.c:
4144         * src/pic/gen.c:
4145         * src/pic16/gen.c:
4146         * src/z80/gen.c:
4147         * src/xa51/gen.c:
4148
4149 2003-07-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4150
4151         added support for new library format to z80, gbz80 linkers:
4152         *link/z80/aslink.h
4153         *link/z80/lklex.c
4154         *link/z80/lklib.c
4155         *link/z80/lklist.c
4156
4157 2003-07-24  Bernhard Held <bernhard AT bernhardheld.de>
4158
4159         * src/SDCCicode.c (operandOperation): fixed problem with bitops and 0xffffffff;
4160         after {double d = 0xffffffff; long l = d;} l will be 0x80000000 (LONG_MIN)
4161
4162 2003-07-23  Bernhard Held <bernhard AT bernhardheld.de>
4163
4164         added DUMMY_READ_VOLATILE:
4165         * src/SDCC.y:
4166         * src/avr/gen.c:
4167         * src/xa51/gen.c:
4168         * src/z80/gen.c:
4169         * src/pic/gen.c:
4170         * src/pic16/gen.c:
4171         * src/mcs51/gen.c:
4172         * src/ds390/gen.c:
4173         * src/SDCCcse.c (algebraicOpts): many improvements
4174         * src/SDCCcse.h: removed algebraicOpts()
4175         * src/SDCCicode.c (picDummyRead): added
4176
4177 2003-07-23  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4178
4179         * as/mcs51/lkmem.c: Changed message "Insufficient DRAM memory" to
4180         "Insufficient space in data memory".
4181
4182 2003-07-20  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4183
4184         * src/mcs51/gen.c: fixed bug #771358
4185         * src/z80/gen.c: fixed bug #759087
4186
4187 2003-07-20  Bernhard Held <bernhard AT bernhardheld.de>
4188
4189         * src/pic16/glue.c: minor cleanup by Vangelis
4190
4191 2003-07-19  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4192
4193         * device/include/regc515c.h: fixed #758477
4194         * device/lib/_gptrget.c: saving some cycles in generic pointer get
4195         * device/lib/_gptrput.c: saved a few bytes
4196         * my tab spacing is 8, yours too?)
4197         * device/lib/_ser.c: process RX bytes earlier than TX bytes
4198         * device/lib/serial.c: process RX bytes earlier than TX bytes
4199         * src/mcs51/gen.c(genGenPointerGet/Set): removed writing of type after postincrement
4200
4201 2003-07-18  Erik Petrich <epetrich AT ivorytower.norman.ok.us>
4202
4203         * src/z80/gen.c: fixed some right shift bugs (#772726 among them)
4204
4205 2003-07-17  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4206
4207     * link/z80/lklibr.c: fixed bug when there is a '.' in a library path.
4208
4209 2003-07-17  Bernhard Held <bernhard AT bernhardheld.de>
4210
4211         * device/lib/Makefile.in: bad fix, reverted to 1.43
4212
4213 2003-07-16  Bernhard Held <bernhard AT bernhardheld.de>
4214
4215         * device/lib/Makefile.in: added missing z80 object files
4216
4217 2003-07-14  Bernhard Held <bernhard AT bernhardheld.de>
4218
4219         * src/SDCCcse.c (algebraicOpts): CSE fun with &|^ and 0x00/0xff literals
4220         pic16 progress by Vangelis:
4221         * src/SDCCglobl.h:
4222         * src/SDCCmain.c:
4223         * src/pic/Makefile:
4224         * src/pic:
4225         * pic/Makefile:
4226         * pic16/device.c:
4227         * pic16/device.h:
4228         * pic16/gen.c:
4229         * pic16/gen.h:
4230         * pic16/genarith.c:
4231         * pic16/glue.c:
4232         * pic16/main.c:
4233         * pic16/pcode.c:
4234         * pic16/pcode.h:
4235         * pic16/pcodepeep.c:
4236         * pic16/peeph.def:
4237
4238 2003-07-13  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4239
4240     * src/SDCCmain.c, src/SDCCglobl.h: added option --no-std-crt0
4241
4242 2003-07-12  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4243
4244     * sdcc.dsw, all.dsp, link/z80/linkgbz80.dsp, as/z80/as-gbz80.dsp:
4245     added gbz80 build to MSVC project.
4246     * src/SDCCmain.c, src/SDCCglue.c, src/z80/main.c, src/z80/z80.dsp,
4247     link/z80/aslink.h, linkz80.dsp: cleaned up z80 and gbz80 asm files
4248     from 8051 stuff and setup so it links using a .lnk file.
4249
4250 2003-07-06  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4251
4252     * support/librarian/sdcclib.c: sdcc librarian.
4253     * as/mcs51/aslink.h, as/mcs51/lklib.c: Support for libraries created
4254     with sdcclib.
4255
4256 2003-07-03  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4257
4258     * as/mcs51/lkmain.c: properly handle extensions in function afile.
4259
4260 2003-07-02  Borut Razem <borut.razem AT siol.net>
4261
4262         * src/port.h, src/SDCCmain.c, src/pic/glue.h, src/pic/main.c,
4263         src/pic16/glue.h, sdcc/src/pic16/main.c, src/izt/i186.c,
4264         src/izt/tlcs900h.c, src/avr/main.c, src/ds390/main.c, src/mcs51/main.c,
4265         src/xa51/main.c, src/z80/main.c:
4266         virtualization of glue() function: each port has it's own glue function,
4267         which is accessed by do_glue function pointer in PORT.general structure
4268
4269 2003-07-01 Kevin Vigor <kevin AT vigor.nu>
4270
4271         * DS800C400 fun, improved ROM interface and tinibios.
4272
4273 2003-06-27 Kevin Vigor <kevin AT vigor.nu>
4274
4275         * More support for DS80C400. Now includes beginning of interface to ROM.
4276
4277 2003-06-25  Bernhard Held <bernhard AT bernhardheld.de>
4278
4279         * src/mcs51/gen.c (gencjneshort): fixed bug #760345
4280
4281 2003-06-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4282
4283         * as/mcs51/lkaomf51.c: Make sure the size of the last procedure is correct.
4284
4285 2003-06-19  Borut Razem <borut.razem AT siol.net>
4286
4287         * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
4288
4289 2003-06-19  Borut Razem <borut.razem AT siol.net>
4290
4291         * src/SDCCutil.h, src/SDCCutil.c, src/SDCCglobl.h, src/SDCCmain.c, src/z80/main.c:
4292         fixed Z80 port - crt0.o: cannot open.
4293
4294 2003-06-19  Bernhard Held <bernhard AT bernhardheld.de>
4295
4296         * support/Util/MySystem.c (merge_command): revert bad fix
4297
4298 2003-06-18  Borut Razem <borut.razem AT siol.net>
4299
4300         * src/SDCC.lex, src/SDCCmain.c: fixed some warnings, introduced with changes made 15.06.1003
4301
4302 2003-06-18  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4303
4304         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
4305         option --use-stdout sends errors to stdout instead of stderr.
4306
4307 2003-06-18  Bernhard Held <bernhard AT bernhardheld.de>
4308
4309         * support/Util/MySystem.c (merge_command): quick fix for Linux segfault with \"cmd\" arg
4310
4311 2003-06-15  Borut Razem <borut.razem AT siol.net>
4312
4313         * support/cpp2/sdcc.h: HAVE_DOS_BASED_FILE_SYSTEM defined for _WIN32
4314         * src/SDCC.lex: cloneXxx and copyAndFreeXxx functions for options and optimize stack handling
4315         * src/SDCCglobl.h, src/SDCCmain.c, src/ds390/main.c, src/mcs51/main.c, src/z80/main.c:
4316         fixed width array of pointers replaced with sets;
4317         multiple include and lib paths ared transferred to preprocessor and linker
4318         * src/SDCCset.c, src/SDCCset.h: added function setFromSetNonRev() and mergeSets()
4319         * src/SDCCsymt.c: reimplemented function inCalleeSaveList() by using sets instead
4320         fixed width array of pointers
4321         * src/SDCCutil.c, src/SDCCutil.h: added functions fputStrSet(), appendStrSet(), joinStrSet();
4322         removed functions addToList(), join(), joinn(), pathCharsEquivalent(), pathCharTransform(),
4323         fixupPath(), getPathDifference()
4324         * src/ds390/gen.c, src/mcs51/gen.c: reimplemented function  inExcludeList() by using sets instead
4325         fixed width array of pointers
4326
4327 2003-06-11  Bernhard Held <bernhard AT bernhardheld.de>
4328
4329         * src/pic16/ralloc.c: fix warnings
4330         * src/pic16/pcode.c: fix warning
4331
4332 2003-06-10  Scott Dattalo  <scott AT dattalo.com>
4333
4334          Scott D. for Vangelis Rokas (vrokas AT otenet.gr). I (scott) don't
4335         know all the details, but essentially this set of changes enable
4336         the pic16 port to generate movff instructions and generate assembler
4337         directives,
4338         * src/SDCCmain.c:
4339         * src/pic16/gen.c:
4340         * src/pic16/glue.c:
4341         * src/pic16/pcode.c:
4342         * src/pic16/device.c:
4343         * src/pic16/main.c:
4344         * src/pic16/pcode.h:
4345         * src/pic16/pcoderegs.c:
4346         * src/pic16/ralloc.c:
4347         * src/pic16/ralloc.h:
4348
4349 2003-06-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4350
4351         * support/Util/SDCCerr.c, src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx:
4352         added option --vc, so sdcc errors and warnings are compatible with
4353         Microsoft Visual Studio.
4354
4355 2003-06-07  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4356
4357         * device/lib/_atof.c, device/lib/Makefile.in, device/include/stdlib.h,
4358           device/lib/libfloat.lib: added atof function.
4359
4360 2003-06-04  Bernhard Held <bernhard AT bernhardheld.de>
4361
4362         * doc/sdccman.lyx: updated to Lyx 1.3
4363         * doc/cdbfileformat.lyx: updated to Lyx 1.3
4364         * doc/test_suite_spec.lyx: updated to Lyx 1.3
4365         * doc/Makefile: added fix for the \tabularnewline problem, thanks to Jesus
4366
4367 2003-06-03  Bernhard Held <bernhard AT bernhardheld.de>
4368
4369         * src/SDCCpeeph.c: separate peepRules2pCode() for pic16 by "Vangelis Rokas" <vrokas AT otenet.gr>
4370
4371 2003-06-02  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4372
4373         * doc/sdccman.lyx: cvs revision keywords, passing pdf information in latex preamble,
4374           additions to the "related tools/documentation" section
4375
4376 2003-06-02  Bernhard Held <bernhard AT bernhardheld.de>
4377
4378         * src/SDCCglue.c (tempfileandname): added check for missing TMP/TEMP/TMPDIR variable
4379
4380 2003-05-29  Bernhard Held <bernhard AT bernhardheld.de>
4381
4382         * src/pic/device.c: added 16F819, patch by "David I. Lehn" <dlehn AT vt.edu>
4383         * src/SDCCcse.c (algebraicOpts): fixed "c * 1"
4384
4385 2003-05-28  Bernhard Held <bernhard AT bernhardheld.de>
4386
4387         * doc/sdccman.lyx: fix double dash and other minor things
4388         * doc/Makefile: fix double dash
4389
4390 2003-05-28  Karl Bongers(patches from Martin Helmling)
4391         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files. Martin adds
4392           condition and ignore commands.
4393
4394 2003-05-28  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4395
4396         * doc/sdccman.lyx: Changes all over, index improved, smaller margins. The manual
4397           is in parts still quite out of date, I did changes as far as I felt makes sense
4398           for a non-native english speaker.
4399           Please feel free to add to the manual or to correct my changes.
4400         * doc/Makefile: undid touching the date of intermediate tex files.
4401
4402 2003-05-26  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4403
4404         * doc/sdccman.lyx: Manual has an index now
4405
4406 2003-05-25  Bernhard Held <bernhard AT bernhardheld.de>
4407
4408         Finalize muluint/mulsint and mululong/mulslong merging:
4409         * device/lib/_mulint.c
4410         * device/lib/_mullong.c
4411         * device/lib/gbz80/mul.s
4412         * device/lib/gbz80/stubs.s
4413         * device/lib/z80/mul.s
4414         * device/lib/z80/stubs.s
4415         * src/SDCCsymt.c (initCSupport)
4416
4417 2003-05-25  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4418
4419         * as/mcs51/lkaomf51.c: Address space 'z' was missing.
4420         * src/avr/avr.dsp, src/ds390/ds390.dsp, src/mcs51/mcs51.dsp,
4421           src/pic/pic.dsp, src/pic16/pic16.dsp, src/xa51/xa51.dsp,
4422           src/x80/z80.dsp: peep.rul is bigger now, so /Zm1000 is used
4423           instead of /Zm500.
4424
4425 2003-05-25  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4426
4427         * src/mcs51/peeph.def: added rules 244.x, 245.x. Although they pass
4428           the regression tests I'm not brave enough to enable 245.b, 245.c
4429         * doc/sdccman.lyx: added latex preamble for hyperref package.
4430           Using pdflatex this will give you a hyperlinked pdf file with
4431           bookmarks. (prepend '%' before /usepackage if this breaks something)
4432
4433 2003-05-24  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4434
4435          * doc/sdccman.lyx: updated information about .adb files (fixed bug 742649)
4436
4437 2003-05-22  Bernhard Held <bernhard AT bernhardheld.de>
4438
4439         * src/pic16/pcode.c (pic16_get_op_from_instruction): fixed a gcc 3.x warning
4440
4441 2003-05-21    <johan AT balder>
4442
4443         * src/SDCCglue.c (printIval): fixed bug #739934
4444
4445 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
4446
4447         Applied patch from bug 737905 (renamed yylineo to mylineno):
4448         * src/altlex.c
4449         * src/SDCCast.c
4450         * src/SDCglobl.h
4451         * src/SDCC.lex
4452         * src/SDCCsymt.c
4453         * src/SDCCval.c
4454         * src/pic16/pcode.c: Cleaned warnings
4455         * src/pic16/pcodeflow.c: Cleaned warnings
4456         * src/pic16/pcoderegs.c: Cleaned warnings
4457
4458 2003-05-19  Scott Dattalo  <scott AT dattalo.com>
4459
4460         * src/pic16/pcode.c: Cleaned warnings
4461         * src/pic16/pcodepeep.c: Cleaned warnings
4462         * src/pic16/ralloc.c: Cleaned warnings
4463
4464 2003-05-19  Bernhard Held <bernhard AT bernhardheld.de>
4465
4466         * doc/sdccman.lyx: fixed bug 739745
4467         * src/pic16/pcode.c (pic16_get_op): fixed warning on alpha
4468
4469 2003-05-18  Bernhard Held <bernhard AT bernhardheld.de>
4470
4471         * src/port.h: removed DEFAULT_PORT, it's not yet pic16 ;-)
4472         it can be defined with CFLAGS when running configure
4473         * src/SDCCmain.c: fixed compiling + linking with object files
4474
4475 2003-05-18  Vangelis Rokas (vrokas AT otenet.gr)
4476
4477         * configure.in: configure for pic16 port,
4478             added --disable-pic16-port
4479         * sdccconf_in.h: added macro OPT_DISABLE_PIC16
4480         * src/SDCCmain.c: linkOptions is changed to set *,
4481             added if/endif conditional macros to remove options help
4482             messages from optionsTable when a port is not configured, added
4483             support for the PIc16 port in the ports table, when executing
4484             the compiler with no port specified on command line, a default
4485             port is selected with the new macro DEFAULT_PORT which is
4486             defined in port.h, in setDefaultOptions() linkOptions is removed
4487             from initialization assignment, since now it is a set,
4488             parseCmdLine uses setParseWithComma for linkOptions, in
4489             linkEdit() linkOptions are accessed with new function indexSet()
4490             which returns the i'th item of a set variable. See SDCCset.c, in
4491             linkEdit() when calling buildCmdLine(), added linkOptions as
4492             last argument. Now users can pass arguments to gplink via the
4493             -Wl option, main() uses pic16glue() to glue up pic16 programs
4494         * src/SDCCpeeph.c: various changes to support pic16
4495         * src/SDCCset.c: added function  void *indexSet(set *, int)  to
4496             return the i'th item of the set
4497         * src/SDCCset.h: added function prototype for indexSet()
4498         * src/SDCCsymt.c: in checkSClass(), added support for PIC16
4499         * src/clean.mk: added pic16 in CLEANALLPORTS variable
4500         * src/port.h: added TARGET_ID_PIC16,TARGET_IS_PIC16 macro,
4501             added macro DEFAULT_PORT
4502         * src/pic/main.c: corrected arguments of gplnk in _linkCmd
4503         * src/pic16/gen.c: bug fix in genCpl(), now the correct code is
4504             generated
4505         * src/pic16/glue.c: commented out some error producing lines
4506         * src/pic16/main.c: __config directives are commented out to stop
4507             gpasm complaining and test the linkage with gplink, _linkCmd and
4508             _asmCmd changed to be more gplink and gpasm friendly
4509         * src/pic16/peeph.def: peep rule 3 is commented out, since it
4510             produced an error when parsed, peep rule 12 is added to utilize
4511             movff, but it is commented out since the pCode does not support
4512             yet a command with 2 address arguments
4513
4514 2003-05-18    <johan AT balder>
4515
4516         * src/ds390/gen.c (genArrayInit): removed obsolete and buggy ARRAYINIT
4517         * src/ds390/main.c (genArrayInit): removed obsolete and buggy ARRAYINIT
4518 2003-05-17  Karl Bongers(apply patches from Martin Helmling)
4519
4520         * debugger/mcs51/sdcdb.c,cmd.c,break.c and .h files.
4521   Added feature to script commands from file.
4522
4523 2003-05-14  Bernhard Held <bernhard AT bernhardheld.de>
4524
4525         * device/lib/_strtok.c: fixed bug #734355 by Lenny Story and Tim Woodall
4526         * src/SDCCutil.c: include ctype.h for win32
4527
4528 2003-05-13  Bernhard Held <bernhard AT bernhardheld.de>
4529
4530         * src/pic16/*: removed CR from many files, reported by Vangelis Rokas
4531
4532 2003-05-12  Karl Bongers(apply development patches from Martin Helmling)
4533
4534         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,break.c and .h files.
4535   Fixed so you can set breakpoints prior to run, run does not stop
4536   on entry now.  Add tbreak.  Other enhancements and fixes for use
4537   with ddd.
4538
4539 2003-05-12  Borut Razem <borut.razem AT siol.net>
4540
4541         * src/SDCCmain.c: fixed the problem with searching the DATADIR as the last resort on *nix
4542
4543 2003-05-11  Borut Razem <borut.razem AT siol.net>
4544
4545         * src/SDCCutil.c: WIN32 version of getBinPath() calls GetModuleFileName() to determine
4546         the path of bin directory, so that PATH is the only env. variable, which has to be set
4547         in case of standard installation.
4548         * src/ds390/ds390.dsp: increased value of /Zm option to 1000
4549         * src/pic/main.c: add quotes to file name parameters for gplink and gpasm
4550         * src/SDCCglobl.h, src/SDCCmain.c, doc/sdccman.lyx: added --print-search-dirs command line option
4551
4552 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
4553
4554         * src/SDCCmain.c (linkEdit): fixed buffer overflow for gbz80
4555         * support/regression/Makefile: inter-port-clean is no longer nesessary, the
4556         temp files are in the port dir; clean the gen/test directory when
4557         generating new test.c
4558         * support/regression/ports/host/spec.mk: defined OBJEXT for target clean
4559         * support/regression/tests/vaargs.c: fixed gcc 3.3 warning
4560         * support/regression/tests/zeropad.c: added
4561
4562 2003-05-09    <johan AT balder>
4563
4564         * src/SDCCglue.c: fixed bug #597940
4565
4566 2003-05-05  Karl Bongers(apply patches from Martin Helmling)
4567
4568         * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
4569   cache sfr, optimize next,step, fix off by one sourceline,
4570   support ddd list function.
4571         * sim/ucsim/cmd.src/newcmd.cc - small fix for sdcdb use.
4572
4573 2003-05-04  Bernhard Held <bernhard AT bernhardheld.de>
4574
4575         * support/regression/HTMLgen.py: added compare_s2f()
4576         * support/regression/Makefile: redo 1.27
4577         * support/regression/generate-cases.py: redo 1.5
4578
4579 2003-04-30  Bernhard Held <bernhard AT bernhardheld.de>
4580
4581         * support/regression/tests/float.c: workaround 33 bit hex constant
4582         * support/regression/tests/simplefloat.c: fix division for host
4583
4584 2003-04-29  Scott Dattalo  <scott AT dattalo.com>
4585
4586         * src/pic/pcoderegs.c Applied patch from Jim Hawkridge <jim AT jimhawkridge.uk.eu.org>
4587         that tame's the PIC's over-aggressive optimizer.
4588
4589 2003-04-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
4590
4591          * src.dsw, link/z80/aslink.h, link/z80/linkz80.dsp: z80 linker
4592          support for MSVC.
4593
4594 2003-04-29  Kevin Vigor <kevin AT vigor.nu>
4595
4596         Initial support for DS80C400. "Hello world" runs on TINIm400
4597         (with polled I/O).
4598
4599 2003-04-28  Karl Bongers(apply patches for Martin Helmling)
4600
4601          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,symtab.c and .h files.
4602          * Some notes on ddd usage added in debugger/README
4603          Martin Helmling adding more features and fixes for ddd GUI debugger.
4604          Code added for nexti, stepi, up, down, and other adjustments.
4605
4606 2003-04-28  Scott Dattalo  <scott AT DATTALO.COM>
4607
4608         * src/pic/pCodepeep.c non-wildcard asmops are now handled
4609         * src/pic/peeph.def Added two rules to optimize carry manipulation
4610         * src/pic/* removed debug printfs
4611
4612 2003-04-28  Bernhard Held <bernhard AT bernhardheld.de>
4613
4614         * debugger/mcs51/cmd.c: added header newalloc.h
4615
4616 2003-04-26  Bernhard Held <bernhard AT bernhardheld.de>
4617
4618         * as/Makefile: new EXEEXT
4619         * as/z80/Makefile: remove trailing slash of BUILDIR
4620         * as/z80/clean.mk: new EXEEXT
4621         * Makefile.common.in: add to CFLAGS (and others), don't replace it
4622         * support/cpp2/Makefile.in: new EXEEXT
4623         * src/pic/glue.c (pic14emitRegularMap): fixed warning
4624
4625 2003-04-24  Bernhard Held <bernhard AT bernhardheld.de>
4626
4627         Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe;
4628         EXEEXT was introduced to fix all related problems with targets
4629         "clean", "install" and "uninstall"; a couple of further flaws
4630         especially with "clean" have been fixed too
4631         * as/mcs51/Makefile.in
4632         * as/mcs51/clean.mk
4633         * as/z80/Makefile
4634         * Makefile
4635         * clean.mk
4636         * debugger/mcs51/Makefile.in
4637         * debugger/mcs51/clean.mk
4638         * link/z80/Makefile
4639         * link/z80/Makefile.in
4640         * link/z80/clean.mk
4641         * link/Makefile
4642         * packihx/Makefile.in
4643         * packihx/clean.mk
4644         * sim/ucsim/Makefile
4645         * sim/ucsim/clean.mk
4646         * sim/ucsim/avr.src/Makefile.in
4647         * sim/ucsim/avr.src/clean.mk
4648         * sim/ucsim/s51.src/Makefile.in
4649         * sim/ucsim/s51.src/clean.mk
4650         * sim/ucsim/xa.src/Makefile.in
4651         * sim/ucsim/xa.src/clean.mk
4652         * sim/ucsim/z80.src/Makefile.in
4653         * sim/ucsim/z80.src/clean.mk
4654         * sim/ucsim/main_in.mk
4655         * sim/ucsim/packages_in.mk
4656         * sim/ucsim/gui.src/Makefile.in
4657         * sim/ucsim/gui.src/serio.src/Makefile.in
4658         * sim/ucsim/gui.src/serio.src/clean.mk
4659         * src/Makefile.in
4660         * src/clean.mk
4661         * support/cpp2/Makefile.in
4662         * support/cpp2/clean.mk
4663         * support/makebin/Makefile
4664         * support/makebin/clean.mk
4665         * support/scripts/sdcc_mingw32: --program-suffix no longer needed
4666         * doc/sdccman.lyx: --program-suffix no longer needed
4667
4668 2003-04-23  Karl Bongers(apply patches for Martin Helmling)
4669
4670          * debugger/mcs51/sdcdb.c,simi.c,cmd.c,..
4671          Martin Helmling added support for ddd GUI debugger.
4672          Code added to display assembly, set variables, and other commands
4673          to interface to ddd.
4674
4675 2003-04-23  Bernhard Held <bernhard AT bernhardheld.de>
4676
4677         * as/Makefile: fix target clean
4678         * as/clean.mk: fix target clean
4679         * as/z80/clean.mk: fix target clean
4680
4681 2003-04-22  Bernhard Held <bernhard AT bernhardheld.de>
4682
4683         * Makefile.common.in: added  AT EXEEXT AT
4684         * configure.in: removed all mingw32 stuff
4685         * configure: rebuilt from configure.in
4686         * doc/sdccman.lyx: updated section "installation"
4687         * support/scripts/sdcc_mingw32: adapted to configure
4688         * support/scripts/sdcc_cygwin_mingw32: added
4689
4690 2003-04-22  Scott Dattalo  <scott AT dattalo.com>
4691
4692         * src/pic Added object file support for the PIC port
4693         * src/pic Applied patch from Craig Franklin (this started the object file support)
4694         * src/regression Updated the PIC regression tests for object files
4695
4696 2003-04-20  Borut Razem <borut.razem AT siol.net>
4697
4698         * sdcc/as/mcs51/lklex.c: make getfid() more robust and fixed gcc warning:
4699           lklex.c: In function `getfid':
4700           lklex.c:203: warning: array subscript has type `char'
4701         * src/SDCCglobl.h: small change in stack handling macros, to avoid crash when compiled
4702           with MSVC with global optimization enabled (probably an cl compiler bug ;-)
4703         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added function fatal(), called from
4704           stack handling macros
4705
4706 2003-04-19  Borut Razem <borut.razem AT siol.net>
4707
4708         * "handling space characters in file path" task:
4709         * src/SDCCmacro.c: fixed bug in handlig quote at the end of line
4710         * support/Util/BuildCmd.c: define par as NULL if parameter value is invalid
4711         * support/Util/MySystem.h: make it self-sufficient
4712         * src/avr/main.c, src/ds390/main.c, src/mcs51/main.c, src/pic/main.c, src/xa51/main.c,
4713           src/z80/main.c, sdcc/as/mcs51/lklex.c:
4714           handling space characters in file path
4715         * src/SDCCmain.c: introduced setDataPaths() function, {datadir} macro
4716           (it will be used by assemblers, which have their own includes, e.g. gpasm)
4717         * support/Util/MySystem.c: handling space characters in executable's path
4718
4719 2003-04-19  Bernhard Held <bernhard AT bernhardheld.de>
4720
4721         * as/z80/Makefile: fix permanent rebuild of z80
4722         * sim/ucsim/gui.src/Makefile.in: target "install" builds the same packages as target "all"
4723         * support/regression/tests/bitfields.c: added Johan's bitfields.c
4724
4725 2003-04-18      Kevin Vigor <kevin AT vigor.nu>
4726
4727         * src/SDCCopt.c: add special case optimization to replace modulo by
4728           a power of two with a bitwise AND.
4729
4730 2003-04-18    <johan AT balder>
4731
4732         * src/mcs51/gen.c (getFreePtr): fixed bug #635354
4733
4734 2003-04-17    <johan AT balder>
4735
4736         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #716790 and removes lot's of redundant register usage around function calls
4737         * src/mcs51/ralloc.c (packRegisters): fixed bug #720667
4738
4739 2003-04-13  Borut Razem <borut.razem AT siol.net>
4740
4741         * doc/sdccman.lyx: updated info about #pragma SAVE/RESTORE nesting
4742         * configure.in, configure: fixed problems on cygwin/WinCVS environmet with ports.* line endings;
4743           fixed mingw problem in adl_NORMALIZE_PATH
4744
4745 2003-04-12  Borut Razem <borut.razem AT siol.net>
4746
4747         * fixed "#pragma SAVE/RESTORE can not be nested":
4748         * src/SDCC.lex: reworked pragma handling functions
4749         * sdcc/src/SDCCglobl.h: reworked stack handling macros
4750         * support/Util/SDCCerr.c, support/Util/SDCCerr.h: added E_STACK_VIOLATION error
4751
4752 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
4753
4754         * src/SDCCutil.c (pathEquivalent): defined but not used
4755         * debugger/mcs51/sdcdb.c: replace SDCC_LIB_DIR
4756         * configure.in: remove sdcc_datadir, sdcc_lib_dir and sdcc_include_dir
4757         * configure: rebuilt from configure.in
4758         * sdccconf_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
4759         * sdcc_vc_in.h: remove SDCC_LIB_DIR and SDCC_INCLUDE_DIR
4760         * device/include/Makefile.in: replace sdcc_datadir
4761         * device/lib/Makefile.in: replace sdcc_datadir
4762         * Makefile.common.in: add LDFLAGS from configure
4763         * packihx/Makefile.in: use LDFLAGS
4764         * src/Makefile.in: use LDFLAGS
4765         * support/cpp2/Makefile.in: add LDFLAGS from configure
4766         * support/makebin/Makefile: use LDFLAGS
4767         * .version: bumped version number to 2.3.5
4768
4769 2003-04-12  Borut Razem <borut.razem AT siol.net>
4770
4771         * completed "different paths" task:
4772         * src/SDCCmacro.c: fixed bug in handling quotes
4773         * src/SDCCutil.c, src/SDCCutil.c: rewritten getPrefixFromBinPath()
4774         * src/SDCCmain.c: _discoverPaths() replaced with setBinPaths(), setIncludePath() and setLibPath()
4775
4776 2003-04-12  Bernhard Held <bernhard AT bernhardheld.de>
4777
4778         * src/pic/pcoderegs.c (Remove1pcode): fix warning on alpha
4779
4780 2003-04-11 kevin Vigor <kevin AT vigor.nu>
4781
4782         * ds390/gen.c ds390/peeph.def: fix bug 706781
4783
4784 2003-04-11  Borut Razem <borut.razem AT siol.net>
4785
4786         * support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
4787
4788 2003-04-10  Scott Dattalo  <scott AT dattalo.com>
4789
4790         * src/pic/* Applied the pointer-to-function patch from Steve Tell.
4791         * src/pic/* Fixed several pointer bugs. (PIC port broke when the ruonly bit was
4792          set - this bit used to not be set...).
4793         * src/pic/gen.c Fixed buf 609268 ==> x = (x+1) & 0xf; generated
4794           bad code in PIC Port
4795         * src/regression/and2.c added to test bug 609268
4796         * src/regression/Makefile added and2.c to regression test
4797
4798
4799 2003-04-08    <johan AT CP255758-A>
4800
4801         * src/mcs51/gen.c (gen51Code): display reg usage in --icode-in-asm
4802         * src/mcs51/ralloc.c (serialRegAssign): update the registers in use and save some slocs
4803         * src/SDCCicode.h: added riu to show the register usage in --icode-in-asm
4804
4805 2003-04-07  Bernhard Held <bernhard AT bernhardheld.de>
4806
4807         * configure.in: fully support prefix, exec_prefix, datadir, docdir;
4808         fix bug #487815
4809         * support/cpp2/Makefile.in: fix bug #487815
4810         * configure: rebuilt from configure.in
4811         * Makefile.common.in: docdir changed, new path suffixes
4812         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
4813         * sdcc_vc_in.h: reflect changes from sdccconf.h
4814         * src/SDCCglobl.h: remove *SEPARATOR_CHARS, they are now in sdccconf.h
4815         * src/SDCCutil.h: remove BINDIR hack
4816         * doc/sdccman.lyx: update new path hierarchy
4817
4818 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
4819
4820         * src/SDCCpeeph.c: added okToRemoveSLOC test
4821
4822 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
4823
4824         * device/lib/printf_fast.c: added leading zero format ("%06d", etc)
4825
4826 2003-04-06    Paul Stoffregen <paul AT pjrc.com>
4827
4828         * src/SDCCpeeph.c: added labelIsReturnOnly test
4829         * src/mcs51/peeph.def: Peephole 244: replace ljmp to ret with ret
4830
4831 2003-04-05    <johan AT balder>
4832
4833         * src/SDCCcse.c (cseAllBlocks): fixed bug #460088
4834         * src/SDCCloop.c (DEFSETFUNC): fixed bug #460088
4835         * src/SDCCopt.c (eBBlockFromiCode): fixed bug #460088
4836         * src/SDCCast.c: fixed a warning
4837         * src/SDCCast.h: fixed a warning
4838         * src/SDCCicode.c (operandFromAst): fixed a warning
4839
4840 2003-04-04    <johan AT balder>
4841
4842         * src/SDCCloop.c (DEFSETFUNC): undid the fix for bug #519584
4843         * src/SDCCast.c (decorateType): fixed bug #715076
4844         * src/SDCC.y: fixed bug #702907
4845
4846 2003-04-03    <johan AT balder>
4847
4848         * device/lib/_mulint.c (_muluint): new #pragma LESS_PEDANTIC
4849         * src/SDCCopt.c (eBBlockFromiCode): new #pragma LESS_PEDANTIC
4850         * src/SDCCglobl.h (PRAGMA_LESSPEDANTIC): new #pragma LESS_PEDANTIC
4851         * src/SDCC.lex (doPragma): new #pragma LESS_PEDANTIC
4852         * src/SDCCmain.c (parseCmdLine): new #pragma LESS_PEDANTIC
4853
4854 2003-04-03  Bernhard Held <bernhard AT bernhardheld.de>
4855
4856         * _decdptr.c: fix return values
4857         * _gptrget.c: fix return values
4858         * _gptrgetc.c: fix return values
4859         * _gptrput.c: fix return values
4860         * _mulint.c: fix return values
4861         * as/z80/Makefile: fix 'make -j' problem
4862
4863 2003-04-02  Bernhard Held <bernhard AT bernhardheld.de>
4864
4865         * Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
4866         * configure.in: big cleanup, updated to autoconf 2.5x
4867         * configure: rebuilt from configure.in
4868         * sdccconf_in.h: new RETSIGTYPE, and other PATHs
4869         * sdcc_vc_in.h: reflect changes from sdccconf.h
4870         * doc/Makefile: fixed a flaw in "make install"
4871
4872 2003-04-02    <johan AT balder>
4873
4874         * src/ds390/gen.c (genCmp): no comments
4875         * src/mcs51/gen.c (genCmp): no comments
4876         * src/SDCCopt.c (eBBlockFromiCode): detect missing return values
4877         * src/SDCCast.c (ast_print): fixed the function type in --dumptree
4878
4879 2003-04-01  Bernhard Held <bernhard AT bernhardheld.de>
4880
4881         * support/regression/generate-cases.py: place generated file in given sub directory
4882         * support/regression/ports/host/spec.mk: prevent removal of testfwk.o
4883         * support/regression/Makefile: improvements for 'make -j';
4884         side effect: it's simpler and faster now
4885
4886 2003-03-31  Borut Razem <borut.razem AT siol.net>
4887
4888         * src/z80/main.c: link-{port} and as-{port} defined without path
4889         * src/src.dsp: support/Util/MySystem.h and src/SDCCutil.h added to project
4890
4891 2003-03-31  Bernhard Held <bernhard AT bernhardheld.de>
4892
4893         * Makefile, src/Makefile.in: add dependencies, so that 'make -j' works
4894
4895 2003-03-30  Borut Razem <borut.razem AT siol.net>
4896
4897         * support/Util/BuildCmd.c, support/Util/BuildCmd.h: rewrite buildCmdLine(),
4898           changed type of list parameter to set
4899         * src/ds390/main.c: changed type of parameter asmOptions to set in _tininative_do_assemble()
4900         * src/port.h: changed type of do_assemble() parameter to set
4901         * src/SDCCmain.c: type of asmOptions changed to set, introduced setParseWithComma(),
4902           sdcpp defined without path, removed variable VersionString, introduced set binPathSet,
4903           definition of "cppoutfilename" macro with NULL value in preProcess()
4904         * src/SDCCglobl.h: included "SDCCset.h", added declaration of setParseWithComma()
4905         * src/SDCCglue.c: removed variable VersionString, inroduced spacesToUnderscores()
4906         * support/Util/MySystem.c, support/Util/MySystem.h: rewrite, char *ExePathList[]
4907           replaced with set *binPathSet
4908         * shash_add() deallocates the item, if allready exsists, before adding the new one
4909         * src/SDCCmacro.c: handling macros with empty or NULL values in _evalMacros()
4910
4911 2003-03-30  Scott Dattalo  <scott AT dattalo.com>
4912
4913         * src/pic/gen.c: Commit patch from Steve Tell <tell AT telltronics.org> that fixes
4914           a nested for loop bug in the PIC port
4915         * src/regression/nestfor.c: new regression test file Steve wrote to test nested
4916           for loops
4917
4918 2003-03-29  Bernhard Held <bernhard AT bernhardheld.de>
4919
4920         * support/Util/dbuf.h: remove C++ stuff to make it portable
4921
4922 2003-03-28  Borut Razem <borut.razem AT siol.net>
4923
4924         * src/SDCC.lex: Fix for bug #711240: dynamic buffer handling of C
4925           literal strings in stringLiteral()
4926         * support/Util/dbuf.c, support/Util/dbuf.h: added: dynamic buffer handling
4927         * src/Makefile.bcc, src/Makefile.in, src\src.dsp: added support/Util/dbuf.c
4928           to the project
4929
4930 2003-03-27  Paul Stoffregen <paul AT pjrc.com>
4931
4932         * src/SDCCpeeph.c (pcDistance): accurate byte distance for mcs51
4933
4934 2003-03-26    <johan AT balder>
4935
4936         * src/mcs51/gen.c (saveRegisters): catched symbol abuse
4937         * src/ds390/gen.c (saveRegisters): catched symbol abuse
4938         * src/SDCCast.c (decorateType): fixed " -v < 3"
4939
4940 2003-03-23  Bernhard Held <bernhard AT bernhardheld.de>
4941
4942         * doc/cdbfile.html: removed, replaced by cdbfileformat.lyx
4943         Added Lenny Story's debug infrastructure changes:
4944         * src/Makefile.in:  added new files cdbFile.c and SDCCdebug.c
4945         * src/Makefile.bcc: added new files cdbFile.c and SDCCdebug.c
4946         * src/cdbFile.c: added
4947         * src/SDCCdebug.c: added
4948         * src/SDCCdebug.h: added
4949         * src/SDCCast.c (createFunction)
4950         * src/SDCCglue.c (emitRegularMap, emitStaticSeg, emitOverlay, glue)
4951         * src/SDCCmain.c (parseCmdLine, main)
4952         * src/SDCCmem.c (redoStackOffsets)
4953         * src/SDCCsymt.c (cdbStructBlock, cdbTypeInfo, cdbSymbol, cdbStruct, cdbStructBlock)
4954         * src/SDCCsymt.h
4955         * src/common.h
4956         * src/avr/gen.c (genAVRCode)
4957         * src/ds390/gen.c (gen390Code)
4958         * src/mcs51/gen.c (gen51Code)
4959         * src/pic/gen.c (genpic14Code)
4960         * src/pic/glue.c (pic14emitRegularMap, pic14emitStaticSeg, pic14emitOverlay, picglue)
4961         * src/xa51/gen.c (genXA51Code)
4962         * src/SDCCast.c: fixed "void foo(void){char c; -c < 0;}"
4963
4964 2003-03-22  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
4965
4966         * src/mcs51/gen.c (genCodePointerGet): quicker code for bug #700797
4967         * src/mcs51/peeph.def: added rules 177, 241.x to 243, touched 181, 182.x, 193.x
4968
4969 2003-03-22    <johan AT balder>
4970
4971         * src/SDCCicode.c (geniCodeDerefPtr): fixed bug #698231
4972
4973 2003-03-21  Bernhard Held <bernhard AT bernhardheld.de>
4974
4975         * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54
4976         * doc/cdbfileformat.lyx: added, written by Lenny Story
4977         * doc/Makefile: added cdbfileformat.lyx
4978         * doc/clean.mk: added cdbfileformat.lyx
4979
4980 2003-03-20  Bernhard Held <bernhard AT bernhardheld.de>
4981
4982         * src/mcs51/peeph.def: fix bug #705773
4983
4984 2003-03-20    <johan AT balder>
4985
4986         An sfr/sbit can have an "at #" AND an initializer
4987         * src/SDCCsymt.c (checkSClass):
4988         * src/SDCCmem.c (allocGlobal):
4989         * src/SDCCmem.c (allocLocal):
4990         * src/SDCCast.c (createBlock):
4991
4992 2003-03-17  Bernhard Held <bernhard AT bernhardheld.de>
4993
4994         * src/ds390/peeph.def: fix bug #704878: added rule 213.b suggested by Jan Rejlek
4995
4996 2003-03-16    <johan AT balder>
4997
4998         Undid the hackup of const and volatile, the problem is much bigger
4999         * src/SDCC.y:1.65
5000         * src/SDCCast.c:1.171
5001         * src/SDCCglue.c:1.138
5002         * src/SDCCicode.c:1.146
5003         * src/SDCCsymt.c:1.150
5004         * src/SDCCval.c:1.65
5005
5006 2003-03-15  Bernhard Held <bernhard AT bernhardheld.de>
5007
5008         * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
5009         * src/ds390/gen.c (genAddrOf): fixed bug #704087
5010
5011 2003-03-13    <johan AT balder>
5012
5013         Hackup const and volatile modifiers in type chains a bit:
5014         * src/SDCC.y:1.63
5015         * src/SDCCast.c:1.169
5016         * src/SDCCglue.c:1.136
5017         * src/SDCCicode.c:1.143
5018         * src/SDCCsymt.c1.146
5019         * src/SDCCsymt.h1.59
5020         * src/SDCCval.c:1.63
5021
5022 2003-03-12    <johan AT balder>
5023
5024         * src/SDCCBBlock.h: more LRH debugging junk
5025         * src/SDCCcflow.h: more LRH debugging junk
5026         * src/SDCCloop.c: more LRH debugging junk
5027         * src/SDCC.y (struct_declaration): fixed bug #697590
5028         * src/SDCCsymt.[hc] (cloneSpec): NEVER EVER use this again
5029         * src/ds390/gen.c (aopForRemat): fixed bug #700031
5030         * src/SDCCglue.c (emitStaticSeg): fixed bug #700797
5031
5032 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
5033         * src/SDCCpeeph.c: quit being lazy and made proper fix (peephole
5034         test function names must now match exactly).
5035         * src/SDCCcse.c: added special case in findCheaperOp to allow
5036         extending a short integer. Makes less awful code for bug 700121 test case.
5037
5038 2003-03-11  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5039
5040         * as/mcs51/lkmain.c: Added ASlink-Warning to messages
5041         * as/mcs51/lkaomf51.c: Fixed bug when linking asmblink example
5042
5043 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
5044
5045         * src/SDCCpeeph.c: fix so that operandsNotEqualX functions are
5046         actually called (operandsNotEqual() was called for all
5047         operandsNotEqualX tests).
5048
5049 2003-03-11 Kevin Vigor <kevin AT vigor.nu>
5050
5051         * src/SDCCcse.c: fix findCheaperOp to prevent replacing int types
5052         with shorter literals. Fixes bug 700121.
5053
5054 2003-03-11    <johan AT balder>
5055
5056         * src/SDCCsymt.c (compareType): a (void *) can be assigned to any pointer
5057
5058 2003-03-11  Bernhard Held <bernhard AT bernhardheld.de>
5059
5060         * src/SDCCloop.c (mergeRegions): an evil beast is dead
5061         * src/SDCCmain.c (preProcess): minor cleanup: eliminate preOutName
5062
5063 2003-03-10  Borut Razem <borut.razem AT siol.net>
5064
5065         * src/SDCCmain.c: pipe preprocessor's output
5066         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
5067         * sdcc_vc_in.h: define pclose as _pclose for WIN32
5068         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
5069         which closes all pipes in pipeSet set
5070         * src/SDCCset.c: free deleted item in function deleteSetItem()
5071         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
5072         moved from z80 to src subproject
5073         * .version: increased version number to 2.3.4
5074
5075 2003-03-10  Bernhard Held <bernhard AT bernhardheld.de>
5076
5077         * support/regression/ports/mcs51/spec.mk: increase timeout for CF's sparc to 30s
5078         * support/regression/ports/ds390/spec.mk: increase timeout for CF's sparc to 25s
5079         * support/regression/ports/xa51/spec.mk: fix typo
5080
5081 2003-03-09  Bernhard Held <bernhard AT bernhardheld.de>
5082
5083         * src/SDCCglobl.h: PATH_MAX is already defined in mingw32 headers
5084
5085 2003-03-09  Borut Razem <borut.razem AT siol.net>
5086
5087         * src/SDCCmain.c: pipe preprocessor's output
5088         * support/Util/MySystem.c, support/Util/MySystem.h: added my_popen()
5089         * sdcc_vc_in.h: define pclose as _pclose for WIN32
5090         * src/SDCCglue.c, src/SDCCglue.h: added set pipeSet, added function closePipes,
5091         which closes all pipes in pipeSet set
5092         * src/SDCCset.c: free deleted item in function deleteSetItem()
5093         * src/src.dsp, src/z80/z80.dsp: files support/Util/BuildCmd.c and support/Util/MySystem.c
5094         moved from z80 to src subproject
5095
5096 2003-03-09  Borut Razem <borut.razem AT siol.net>
5097
5098         * src/SDCCglue.c: re-implemented tempfilename() and tempfile(): using mkstemp() if available
5099         * src/SDCCsymt.h: fixed MSVC and BORLANDC compilation (included SDCCglobl.h instead srccconf.h)
5100         * sdcc_vc_in.h: explicitly undefined HAVE_MKSTEMP which is not available on BORLANDC and MSVC
5101         * src/SDCCset.h: removed inclusion of sdccconf.h or sdcc_vc.h
5102         * src/SDCCglobl.h: unification of WIN32 native definitions
5103
5104 2003-03-09  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5105
5106         * src/mcs51/gen.c: applied in-/dec patch mentioned on sdcc-devel 2003-03-01
5107
5108 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
5109
5110         * src/configure.in:   check for endianess (even while cross-compiling)
5111         * src/configure:      check for endianess (even while cross-compiling)
5112         * src/configure_in.h: check for endianess (even while cross-compiling)
5113         * src/avr/gen.c:        remove old endianess stuff
5114         * src/mcs51/gen.c:      remove old endianess stuff
5115         * src/ds390/gen.c:      remove old endianess stuff
5116         * src/pic/gen.c:        remove old endianess stuff
5117         * src/pic/genarith.c:   remove old endianess stuff
5118         * src/pic/glue.c:       fix endianess check
5119         * src/pic16/gen.c:      remove old endianess stuff
5120         * src/pic16/genarith.c: remove old endianess stuff
5121         * src/pic16/glue.c:     fix endianess check
5122         * src/xa51/gen.c:       remove old endianess stuff
5123         * src/z80/gen.c:        fix endianess check
5124         * src/SDCCglue.c:       fix endianess check
5125         * src/ds390/peeph.def: fix bug 700036
5126
5127 2003-03-08  Bernhard Held <bernhard AT bernhardheld.de>
5128
5129         * src/SDCCsymt.h: use appropriate data-types on host for SDCC's int and long
5130         * src/configure: find appropriate data-types on host for SDCC's int and long
5131         * src/configure.in: find appropriate data-types on host for SDCC's int and long
5132         * src/sdccconf_in.h: find appropriate data-types on host for SDCC's int and long
5133         * src/xa51/gen.c: use %d, not %ld for 4 byte variables
5134
5135 2003-03-07    <johan AT balder>
5136
5137         Just a big NOOP:
5138                 some minor cleanups before the big shot
5139                 OP_DEFS and OP_USES now use Kevin's protection
5140                 new option --nolabelopt
5141
5142         * src/SDCCBBlock.c:
5143         * src/SDCCast.c,:
5144         * src/SDCCcflow.c:
5145         * src/SDCCcse.c:
5146         * src/SDCCicode.c:
5147         * src/SDCCicode.h:
5148         * src/SDCClabel.c:
5149         * src/SDCCloop.c:
5150         * src/SDCCmain.c:
5151         * src/ds390/ralloc.c:
5152         * src/mcs51/ralloc.c:
5153         * src/pic/ralloc.c:
5154         * src/xa51/ralloc.c:
5155         * src/z80/ralloc.c:
5156
5157 2003-03-06  Bernhard Held <bernhard AT bernhardheld.de>
5158
5159         * src/pic/pcode.c (get_op): fix 64 bit warnings
5160         * src/pic/pcode.c (pCode2str): fix 64 bit warnings
5161         * src/SDCChasht.c (newHashTable): fix 64 bit warnings
5162         * src/SDCCsymt.c (checkTypeSanity): fix 64 bit warnings
5163         * support/regression/tests/malloc.c: fix 64 bit warnings
5164
5165 2003-03-04  Bernhard Held <bernhard AT bernhardheld.de>
5166
5167         * src/mcs51/gen.c (genMinus): fixed bug 696436
5168
5169 2003-03-02  Borut Razem <borut.razem AT siol.net>
5170
5171         * src/SDCCmain.c: added BORLANDC, corrected MSVC in printVersionInfo()
5172
5173 2003-02-26  Bernhard Held <bernhard AT bernhardheld.de>
5174
5175         * configure.in: test for mkstemp
5176         * sdccconf_in.h: add HAVE_MKSTEMP
5177
5178 2003-02-24  Bernhard Held <bernhard AT bernhardheld.de>
5179
5180         * device/include/ctype.h: removed warning while using --stack-auto
5181         * device/include/malloc.h: removed warning while using --stack-auto
5182         * device/include/string.h: removed warning while using --stack-auto
5183
5184 2003-02-23  Borut Razem <borut.razem AT siol.net>
5185
5186         * src/asm.h: corrected assertion in function printILine(): _pipe() was not executed on MSVC,
5187         because NDEBUG is defined (see man assert)
5188         * sdcc_vc_in.h: vsnprintf is defined as _vsnprintf on MSVC
5189
5190 2003-02-23  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5191
5192         * src/mcs51/gen.c (genUminusFloat): avoided dptr in-/decrement for xdata variables
5193         * src/mcs51/peeph.def: added rule suggested by Gernot Fink, white space/comment changes
5194
5195 2003-02-18  Frieder Ferlemann <Frieder.Ferlemann AT web.de>
5196
5197         * src/SDCCpeeph.c: added peephole conditions testing for same arguments
5198         * src/mcs51/peeph.def: added rules 238a-d which remove redundant moves
5199
5200 2003-02-18    <johan AT balder>
5201
5202         * as/mcs51/asmain.c (asmbl): module can start with a digit
5203         * as/z80/asmain.c (asmbl): module can start with a digit
5204
5205 2003-02-16  Bernhard Held <bernhard AT bernhardheld.de>
5206
5207         * sim/ucsim/mkecho: inserted #!/bin/sh for Cygwin, so that it's executable
5208         * src/asm.c: fix pipe() for Mingw32
5209
5210 2003-02-15  Bernhard Held <bernhard AT bernhardheld.de>
5211
5212         * src/SDCCglue.h: make tmpfileNameSet available for preOutName
5213         * src/SDCCmain.c (preProcess): make sure, that preOutName will be deleted;
5214         make -V work again; --c1mode reads now from stdin
5215         * doc/sdccman.lyx: added --c1mode
5216         * support/Util/SDCCerr.c: new messages for c1 mode
5217         * support/Util/SDCCerr.h: new messages for c1 mode
5218         * src/SDCC.lex (checkCurrFile): test if fullSrcFileName is NULL for c1mode
5219
5220 2003-02-15    <johan AT balder>
5221
5222         * src/asm.c: new options: --no-c-code-in-asm and --i-code-in-asm
5223
5224 2003-02-14  Bernhard Held <bernhard AT bernhardheld.de>
5225
5226         * doc/sdccman.lyx: Environment variables, -o and other minor things
5227
5228 2003-02-14    <johan AT balder>
5229
5230         * src/xa51/main.c: before anyone really tries to use it :)
5231
5232         * Install doc's in share/sdcc/doc
5233         * removed some obsolete files
5234         * Do a proper make distclean and uninstall
5235         M Makefile.common.in
5236         R sdccbuild.sh
5237         M as/Makefile
5238         M device/include/Makefile.in
5239         M device/lib/Makefile.in
5240         M doc/sdccman.lyx
5241         M link/Makefile
5242         M sim/ucsim/doc/Makefile.in
5243         M src/clean.mk
5244         R src/avr/peeph.rul
5245         R src/xa51/peeph.rul
5246         M support/cpp2/Makefile.in
5247         M support/makebin/Makefile
5248
5249
5250 2003-02-13  Bernhard Held <bernhard AT bernhardheld.de>
5251
5252         * support/regression/ports/host/spec.mk: use cc as host compiler for max osx
5253
5254 2003-02-10  Borut Razem <borut.razem AT siol.net>
5255
5256         * doc/bccinst.txt, packihx/packihx.c, sdcc_vc_in.h, src/SDCCset.h,
5257         support/cpp2/config.in: Borland C++ build doesn't depend on Cygwin configure
5258         * Bcc.ini, Makefile.bcc, as/mcs51/Makefile.bcc,
5259         device/examples/ds390/tinitalk/Makefile.bcc, packihx/Makefile.bcc,
5260         support/cpp2/Makefile.bcc, src/Makefile.bcc, src/avr/Makefile.bcc,
5261         src/ds390/Makefile.bcc, src/izt/Makefile.bcc, src/mcs51/Makefile.bcc,
5262         src/pic/Makefile.bcc, src/pic16/Makefile.bcc, src/xa15/Makefile.bcc,
5263         src/z80/Makefile.bcc: Borland Makefile cleanup
5264         * as/z80/Makefile.bcc: Added Borland Makefile
5265         * support/cpp2/borland.h: Removed
5266
5267 2003-02-10  Bernhard Held <bernhard AT bernhardheld.de>
5268
5269         * doc/sdccman.lyx: new pragma NOIV by "Johannes Stezenbach" <js AT convergence.de>
5270         * src/SDCC.lex: new pragma NOIV
5271         * src/SDCCglobl.h: new pragma NOIV
5272         * src/SDCCmem.c: new pragma NOIV
5273
5274 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
5275
5276         * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
5277
5278 2003-02-09  Bernhard Held <bernhard AT bernhardheld.de>
5279
5280         * src/SDCCmain.c: signal handling is switched off by --debug
5281         * doc/Makefile: small fix for install; use clean.mk again
5282         * doc/clean.mk: clean *.pdf and *.html too
5283
5284 2003-02-08  Bernhard Held <bernhard AT bernhardheld.de>
5285
5286         * device/lib/_mulint.c: small fix for large/ds390 --int-long-reent resp. --stack-auto
5287         * device/lib/printfl.c: fix a ds390 bug by making it portable
5288         * src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
5289         * src/SDCCopt.c (cnvToFloatCast): fix compile warning on Cygwin
5290         * src/SDCCopt.c (cnvFromFloatCast): fix compile warning on Cygwin
5291         * debugger/mcs51/cmd.c: converted multi-line string literals
5292         * sim/ucsim/globals.cc: converted multi-line string literals
5293         * src/SDCCmain.c: introduced signal handler to remove temp files
5294         * doc/Makefile: small tweaks, implement clean
5295         * doc: removed generated files
5296
5297 2003-02-05  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5298
5299         * as/mcs51/aslink.h, as/mcs51/lkihx.c, as/mcs51/lkrloc.c:  Applied
5300         patch from Jan Rejlek <jr AT apex-lib.cz> to fix Bug 677692: "Extended
5301         Address Record is not correctly generated for DS390."
5302
5303 2003-02-02  Borut Razem <borut.razem AT siol.net>
5304
5305         * Makefile.bcc: removed non existing cpp project and non compilable izt project from makefile
5306         * as/mcs51/asm.h: fixed compilation with Borland C
5307         * support/cpp2/Makefile.bcc: added rule to generate auto-host.h
5308         * support/cpp2/auto-host_vc_in.h: fixed compilation with Borland C
5309         * src/mcs51/mcs51a.dsp: corrected misspelled project name from msc51a to mcs51a
5310         * src/avr/Makefile.bcc, src/ds390/Makefile.bcc, src/izt/Makefile.bcc,
5311         src/mcs51/Makefile.bcc, src/pic16/Makefile.bcc, src/xa51/Makefile.bcc,
5312         src/z80/Makefile.bcc: delete $(LIB) only if exist
5313         * src/Makefile.bcc, src/pic/Makefile.bcc:  fixed compilation with Borland C
5314
5315 2003-02-02  Bernhard Held <bernhard AT bernhardheld.de>
5316
5317         * device/include/malloc.h: introduced NULL
5318         * device/include/string.h: introduced NULL
5319         * device/include/stdlib.h: introduced NULL
5320         * device/lib/_memcpy.c: removed NULL
5321         * device/lib/_strcat.c: removed NULL
5322         * device/lib/_strchr.c: removed NULL
5323         * device/lib/_strcmp.c: removed NULL
5324         * device/lib/_strcpy.c: removed NULL
5325         * device/lib/_strcspn.c: removed NULL
5326         * device/lib/_strlen.c: removed NULL
5327         * device/lib/_strncat.c: removed NULL
5328         * device/lib/_strncmp.c: removed NULL
5329         * device/lib/_strncpy.c: removed NULL
5330         * device/lib/_strpbrk.c: removed NULL
5331         * device/lib/_strrchr.c: removed NULL
5332         * device/lib/_strspn.c: removed NULL
5333         * device/lib/_strstr.c: removed NULL
5334         * device/lib/_strtok.c: removed NULL
5335         * device/lib/malloc.c: removed NULL, include own header
5336
5337 2003-02-02    <johan AT balder>
5338
5339         * 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
5340         * support/regression/fwk/lib/testfwk.c: div and mod isn't broken anymore
5341         * regressions ds390/spec.mk and mcs51/spec.mk (timeout): my good old balder isn't fast enough for some tests
5342         * src/z80/gen.c (genZ80Code): added c-lines in asm comments
5343         * as/z80/asm.h (NINPUT): increased for long c-comments in regression tests
5344         * src/z80/gen.c (genRightShiftLiteral): fixed the (char)(-3)>>8 (I think)
5345
5346 2003-02-01  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5347
5348         * src/SDCCmain.c: Fixed bug 678574: "ds390: ASlink-Error-Stack overlaps
5349         area 'DATA'"
5350
5351 2003-02-01    <johan AT balder>
5352
5353         * src/SDCCval.c (valBitwise): fixed Karl's "2 | (1<<8)"
5354
5355 2003-01-31    <johan AT CP255758-A>
5356
5357         * src/ds390/main.c (_ds390_genAssemblerPreamble): applied Jan Rejlek's >64K startup patch
5358
5359 2003-01-30    <johan AT balder>
5360
5361         * src/SDCCBBlock.c: automatic bug detection
5362         * src/SDCCicode.c: automatic bug detection
5363
5364 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5365
5366         * src/SDCCglobl.h:   now --xram-size 0 works
5367         * src/SDCCmain.c:    now --xram-size 0 works
5368
5369 2003-01-29    <johan AT balder>
5370
5371         * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
5372
5373 2003-01-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5374
5375         * as/mcs51/aslink.h: Added options --xram-size and --code-size
5376         * as/mcs51/lkdata.c: Added options --xram-size and --code-size
5377         * as/mcs51/lkmain.c: Added options --xram-size and --code-size
5378         * as/mcs51/lkmem.c:  Added options --xram-size and --code-size
5379         * src/SDCCglobl.h:   Added options --xram-size and --code-size
5380         * src/SDCCmain.c:    Added options --xram-size and --code-size
5381
5382 2003-01-28  Bernhard Held <bernhard AT bernhardheld.de>
5383
5384         * src/ds390/gen.c: fix deps by replacing <common.h> with "common.h"
5385         * src/SDCC.lex: rename P_OVERLAY to P_OVERLAY_ for cross-gcc 3.2 MINGW32
5386
5387 2003-01-27    <johan AT balder>
5388
5389         * src/SDCC.y: fixed bug #613764
5390
5391 2003-01-26    <johan AT balder>
5392
5393         * src/SDCClrange.c:  fixed Bernhard's "char * code ptr = &c"
5394         * src/SDCCsymt.h: fixed bug #673374
5395         * src/SDCCglue.c: fixed bug #661910
5396         * src/SDCCast.c: fixed bug #458099 and 673374
5397
5398 2003-01-26  Bernhard Held <bernhard AT bernhardheld.de>
5399
5400         * as/mcs51/strcmpi.c: added, provides Aurelien Jarno's as_strcmpi(); strcmpi() is not ANSI
5401         * as/mcs51/strcmpi.h: added
5402         * as/mcs51/asm.h: remove ugly "#define strcmpi strcmp"
5403         * as/mcs51/aslink.h: remove ugly "#define strcmpi strcmp"
5404         * as/mcs51/asmain.c: strcmpi -> as_strcmpi
5405         * as/mcs51/assym.c: strcmpi -> as_strcmpi
5406         * as/mcs51/lkmem.c: strcmpi -> as_strcmpi
5407         * as/mcs51/lknoice.c: strcmpi -> as_strcmpi
5408         * as/mcs51/lksym.c: strcmpi -> as_strcmpi
5409         * as/mcs51/Makefile.aslink: new module strcmpi
5410         * as/mcs51/Makefile.asx8051: new module strcmpi
5411         * as/mcs51/Makefil.bcc: new module strcmpi
5412         * as/mcs51/Makefile.in: new module strcmpi
5413         * sim/ucsim/s51.src/uc390.cc (get_mem_size): make RAM big enough for tinibios
5414
5415 2003-01-26    <johan AT balder>
5416
5417         * src/SDCCglue.c: reverted back to 1.124
5418         * src/SDCCast.c: reverted back to 1.156
5419         * src/mcs51/gen.c (aopGet): applied Frieder's efficiency patch
5420
5421 2003-01-25    <johan AT balder>
5422
5423         * src/SDCCglue.c: A better fix for bug #661910
5424         * src/SDCCast.c: A better fix for bug #661910
5425         * src/SDCCglue.c (emitRegularMap): That was a little too efficient
5426
5427 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
5428
5429         * src/Makefile.in: remove spawn.o
5430         * src/SDCCmain.c: remove spawn.h
5431         * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX
5432         * src/spawn.c: removed
5433         * src/spawn.h: removed
5434         * support/regression/ports/ds390/spec.mk: link with -r
5435
5436 2003-01-24    <johan AT CP255758-A>
5437
5438         * src/ds390/gen.c (aopOp): fixed bug #667458
5439         * src/SDCCglue.c (emitRegularMap): fixed bug #458099 again
5440         * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
5441         (createIvalCharPtr): an ival doesn't always have a storage class anymore
5442
5443 2003-01-24  Bernhard Held <bernhard AT bernhardheld.de>
5444
5445         * src/mcs51/peeph.def: better assembler identation by Frieder
5446         * src/mcs51/gen.c: better assembler identation by Frieder
5447
5448 2003-01-22  Bernhard Held <bernhard AT bernhardheld.de>
5449
5450         * as/z80/string.h: removed for gcc 3.2
5451         * support/makebin/makebin.c: #include <string.h> for gcc 3.2
5452         * src/pic/pcode.c (get_op_from_instruction): fix concatenation of string literals with __FUNCTION__ for gcc 3.2
5453
5454 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
5455
5456         * src/SDCCmain.c (linkEdit): rename mem and map files even in case of failure
5457         * src/SDCCpeeph.c (replaceRule): fix bug #663503
5458         * support/regression/Makefile: separate temp files for ports
5459         * support/regression/generate-cases.py: separate temp files for ports
5460         * src/mcs51/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
5461         * src/ds390/peeph.def: Frieder: removed 237 (obsolete by 236g and 105); added 237 a/b
5462
5463 2003-01-19  Bernhard Held <bernhard AT bernhardheld.de>
5464
5465         * moved tinitalk to device/examples/ds390
5466
5467 2003-01-14  Bernhard Held <bernhard AT bernhardheld.de>
5468
5469         * as/mcs51/lkmem.c: rflag is for DS390
5470         * src/SDCCglobl.h: removed out_name and options stackOnData, genericPtr
5471         * src/SDCCmain.c (optionsTable, setDefaultOptions): removed --stack-after-data and --generic
5472                          (linkEdit): move mem- and map-files the same way as ihx-files
5473         * src/z80/main.c (_setDefaultOptions): removed --generic
5474         * src/SDCCmain.c (_processC1Arg, parseCmdLine, main): --c1mode works again
5475         * src/SDCCglue.c (createInterruptVect, glue): --c1mode works again
5476         * src/pic/glue.c (picglue): --c1mode works again
5477         * src/pic16/glue.c (pic16glue): --c1mode works again
5478         * src/asm.c (printCLine): fix #660034
5479
5480 2003-01-13  Bernhard Held <bernhard AT bernhardheld.de>
5481
5482         * src/ds390/peeph.def: fix #123; add 14 rules by Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>, 1 by Frieder
5483         * src/mcs51/peeph.def: fix #123; add 14 rules by Fiorenzo, 1 by Frieder
5484         * src/mcs51/gen.c (genFunction): emit r0 instead of ar0 by Fiorenzo
5485         * as/mcs51/lkmem (summary): better fix for sp problem
5486         * src/SDCCglue.c (glue): __start_stack - 1, saves 1 byte!
5487         * src/ds390/main.c (_ds390_finaliseOptions, _tininative_finaliseOptions): stack_loc = 0x400008
5488         * support/regression/ports/*/spec.mk: moving testfwk-object to port dir allow parallel execution of regression tests
5489                                               remove --stack-after-data
5490
5491 2003-01-12  Bernhard Held <bernhard AT bernhardheld.de>
5492
5493         * src/SDCCmain.c (main): port->finaliseOptions() moved for z80 linking
5494         * src/SDCCutil.c (join): ugly bug: missing '\0'
5495         * as/mcs51/lkmem.c (summary): sp on address 7 is safe
5496
5497 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
5498
5499         * src/SDCCmain.c (assemble, linkEdit): preparations for -o
5500         * src/port.h: typo
5501         * src/pic/main.c (_asmCmd): gpasm supports -o
5502         * src/z80/main.c: more general macros
5503         * device/lib/Makefile.in: remove intermediate files
5504
5505 2003-01-11  Bernhard Held <bernhard AT bernhardheld.de>
5506
5507         * .version: Bumped version number to 2.3.3
5508         * src/SDCCBBlock.c: new option -o
5509         * src/SDCCglobl.h: new option -o
5510         * src/SDCCglue.c: new option -o
5511         * src/SDCCmain.c: new option -o
5512         * src/asm.c: new option -o
5513         * src/ds390/main.c: new option -o
5514         * src/pic/glue.c: new option -o
5515         * src/pic/pcode.c: new option -o
5516         * src/pic/ralloc.c: new option -o
5517         * src/pic16/glue.c: new option -o
5518         * src/pic16/pcode.c: new option -o
5519         * src/pic16/ralloc.c: new option -o
5520         * src/z80/main.c: new option -o
5521         * device/lib/Makefile.in: use -o
5522         * support/regression/ports/ds390/spec.mk: use -o
5523         * support/regression/ports/gbz80/spec.mk: use -o
5524         * support/regression/ports/mcs51/spec.mk: use -o
5525         * support/regression/ports/mcs51-stack-auto/spec.mk: use -o
5526         * support/regression/ports/z80/spec.mk: use -o
5527         * support/regression/ports/ucz80/spec.mk: use -o
5528         * support/regression/ports/xa51/spec.mk: use -o
5529         * support/regression/fwk/lib/timeout.c: fix usage string
5530
5531 2003-01-09  Bernhard Held <bernhard AT bernhardheld.de>
5532         * src/mcs51/gen.c (genPlus): replaced "mov b,acc" by "mov b,a" Fiorenzo D. Ramaglia <fd.ramaglia AT tin.it>
5533
5534 2003-01-07    <johan AT balder>
5535
5536         * src/SDCCast.c (decorateType): fixed bug #600035
5537
5538 2003-01-07  Bernhard Held <bernhard AT bernhardheld.de>
5539         * as/mcs51/lkmem.c: added several l-modifiers to printf to remove warnings
5540         * as/mcs51/lkaomf51.c: #include <ctype.h> to remove warnings
5541         * src/pic/main.c (_hasNativeMulFor): outcommented unused variables to remove warnings
5542         * src/pic/pcode.c: outcommented unused variable to remove warnings
5543         * src/pic/ralloc.c: outcommented unused variable to remove warnings
5544
5545 2003-01-06    <karl AT turbobit.com>
5546         * sim/ucsim/cmd.src/command.cc: fixed so "break xram r 0x7654" works again in
5547    regression tests.
5548
5549 2003-01-06    <johan AT balder>
5550
5551         * src/SDCCicode.c: fixed array add
5552
5553 2002-01-05  Bernhard Held <bernhard AT bernhardheld.de>
5554         * src/SDCCmacro.c: MAX_STRING_LENGTH increased to 2048; was too small for regression tests
5555         * support/regression/ports/host/support.c: #include <stdarg.h> for gcc 3.2
5556
5557 2003-01-04    <johan AT balder>
5558
5559         * src/SDCCval.c (getNelements): fixed the initialized array of structures
5560
5561 2002-12-29  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5562         * as/mcs51/Makefile.bcc: fixed typo lkomf51.o -> lkaomf51.o
5563
5564 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
5565         * src/mcs51/peeph.def: added rules 234 and 235 from Frieder Ferlemann <frieder.ferlemann AT web.de>
5566         * support/regression/tests/bug-524697.c: fit mem usage into 8032
5567
5568 2002-12-28  Bernhard Held <bernhard AT bernhardheld.de>
5569         * src/mcs51/gen.c (aopGetUsesAcc): inserted missing "return FALSE"
5570
5571 2002-12-27  Bernhard Held <bernhard AT bernhardheld.de>
5572         * as/mcs51/Makefile.in: fixed typo lkomf51.o -> lkaomf51.o
5573
5574 2002-12-26  Bernhard Held <bernhard AT bernhardheld.de>
5575         * src/mcs51/main.c: removed {bindir}{sep} from aslink
5576
5577 2002-12-10  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5578
5579     * in \sdcc\as\mcs51\ changed these files in order to create an
5580     aomf51 file: aslink.h, lkdta.c, lklex.c, lklibr.c, lklist.c,
5581     lkmain.c.  Also added: lkmem.c and lkaomf51.c.  Changed the
5582     following files to include the previous two files: aslink.dsp,
5583     Makefile.aslink, Makefile.bcc, and Makefile.in.
5584
5585     * Changed \sdcc\src\SDCCmain.c so it creates files with extension
5586     .adb instead of .cdb
5587
5588 2002-11-09  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5589
5590         * \sdcc\as\mcs51\lklist.c: Now reports memory usage using the
5591         value from option --iram-size.
5592
5593 2002-09-20  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5594
5595         * \sdcc\as\mcs51\lklist.c: added boundary check before using
5596         dram[] array.
5597
5598 2002-09-18    <wiml AT hhhh.org>
5599
5600         * SDCClrange.h: exposed setFromRange() and setToRange()
5601         * mcs51/ralloc.c: fixed over-eager packRegsForSupport() and
5602           packRegsForAccUse() (bug 542397)
5603         * mcs51/gen.c: MOVA() is now a function to avoid calling aopGet()
5604           multiple times and emitting the fetch operations more than once
5605           added aopGetUsesAcc() function to allow binary operators to
5606           fetch their operands in the correct order; made genMinus() emit
5607           compact code for X = LITERAL - Y
5608
5609 2002-09-00  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5610         * \sdcc\as\mcs51\lklist.c: Fixed incorrect number of parameters to
5611         sprintf() in line 1267.
5612
5613 2002-09-08  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5614         * \sdcc\src\SDCCglue.c: Generate areas REG_BANK_[0-3] only for 8051
5615         like ports.
5616
5617 2002-09-04  Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
5618         Changes to aslink (All the changes are marked with 'JCF'):
5619
5620         * \sdcc\as\mcs51\aslink.h: External definition of sflag and
5621         summary().
5622
5623         * \sdcc\as\mcs51\lkarea.c: Computes the size of area BSEG_BYTES from
5624         area BSEG.  Also moves, if possible, the DATA area down into the internal
5625         ram so more space is available.
5626
5627         * \sdcc\as\mcs51\lkdata.c: Definition of memory summary output flag
5628         sflag.
5629
5630         * \sdcc\as\mcs51\lklist.c: For the BSEG area report the size in bits,
5631         not bytes.  Function summary() which creates a memory usage summary
5632         file with extension .mem.  Reports of overlaping stack and small stack
5633         size.  If the space for the stack is less than 16 bytes aslink trows a
5634         warning.
5635
5636         * \sdcc\as\mcs51\lkmain.c: Creation of some of the default areas for
5637         the 8051.  Option 'y' for memory summary output file.
5638
5639         Changes to sdcc (All the changes are marked with 'JCF'):
5640
5641         * \sdcc\src\SDCCglobl.h: External definition of RegBankUsed[4].
5642
5643         * \sdcc\src\SDCCglue.c:  If a register bank is used, creates an
5644         overlaying area for it (uses RegBankUsed[4]).
5645
5646         * \sdcc\src\SDCCmain.c: Definition RegBankUsed[4]; marks register
5647         bank zero as used by default.  By default aslink locates the stack
5648         (equivalent to --stack-after-data).  Pass option 'y' to aslink for
5649         the creation of the .mem file.  Delegates the allocation of data area
5650         to aslink (it is not longer 0x30 by default).  If --stack-loc passes
5651         the begining of the stack area to aslink.
5652
5653         * \sdcc\src\SDCCmem.c:  If a register bank is used, marks it so
5654         glue() in SDCCglue.c creates an area for it.
5655
5656 2002-09-03  Borut Razem <borut.razem AT siol.net>
5657         * sdcc/src/SDCCglue.c, sdcc/src/SDCCglue.h, sdcc/src/SDCCmain.c,
5658         sdcc/src/pic/glue.c:
5659         introduced atexit() handler for teporay files removal in case of
5660         errors, assertions, ...
5661
5662 2002-08-29  Borut Razem <borut.razem AT siol.net>
5663         * sdcc/support/cpp2/auto-host_vc_in.h:
5664         re-definition of O_BINARY and other O_XXX as _O_BINARY and _O_XXX, so the problem
5665         with the returned value from read() in sdcc/support/cpp2/cppfiles.c is solved for MSC.
5666         Maybe there is a similar problem with BORLANDC? It should be checked!
5667
5668         * sdcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c, sdcc/src/z80/ralloc.c:
5669         corrected improper use of assert: the assignment to clr variable was done inside the assert.
5670         In case that NDEBUG was defined, the assert macro was substituted with no-op, so the assignment
5671         was not executed, and the compiler (cl) launched a warning:
5672         ralloc.c(1442) : warning C4700: local variable 'clr' used without having been initialized
5673
5674 2002-08-28  Bernhard Held <bernhard AT bernhardheld.de>
5675         * src/SDCCglue.c (printIvalArray): iterative calculation of array length
5676
5677 2002-08-28  Jesus Calvino-Fraga and Borut Razem <borut.razem AT siol.net>
5678         * sdcc/sdcc.dsw: added sdcpp, sdcppa, yacc, conf projects
5679
5680         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
5681           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp,
5682           sdcc/src/xa51/xa51.dsp, sdcc/src/avr/avra.dsp,
5683           sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
5684           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp,
5685           sdcc/src/xa51/xa51a.dsp, sdcc/as/as_z80.dsp,
5686           sdcc/as/aslink.dsp, sdcc/as/asx8051.dsp, sdcc/packihx/packihx.dsp:
5687         - added Release configuration in VS projects
5688         - review of compiler an linker options
5689         - VC .exe files are generated in bin_vc directory, not to interfere
5690           with binaries generated from other projects (cygwin, mingw, bcc ...)
5691
5692         * sdcc/src/yacc.dsp: added
5693
5694         * sdcc/config.dsp, sdcc/configure_vc.awk, sdcc/sdcc_vc_in.h:
5695         added - genarate sdcc_vc.h using sdcc_vc_in.h as template
5696         and insert the version number definitions from .version
5697
5698         * sdcc/support/cpp2/sdcpp.dsp: added - VC project for sdcpp
5699
5700         * sdcc/support/cpp2/sdcppa.dsp, sdcc/support/cpp2/auto-host_vc_in.h:
5701         added - genarate auto-host.h using auto-host_vc_in.h as template
5702
5703         * sdcc/sdcc_vc.h,
5704         removed from CVS, generated automatically
5705
5706 2002-08-25  Bernhard Held <bernhard AT bernhardheld.de>
5707         * support/scripts/inc2h.pl: use gputils or gpasm (from Nathan Hurst)
5708
5709 2002-08-11  Borut Razem <borut.razem AT siol.net>
5710         * support/Util/NewAlloc.c: removed unneeded #include "sdccconf.h" (suggested by Jesus Calvino-Fraga)
5711
5712 2002-08-10  Borut Razem <borut.razem AT siol.net>
5713         * src/SDCCmain.c (main):
5714         file preOutName was unlinked before closed. This seems to be OK on UNIX and cygwin
5715         platforms, but it doesn't work with Visual Studio: the opened file can not be removed.
5716         The consequence was that some temporary files were not removed.
5717
5718         * src/SDCCglue.c:
5719         unification of code in functions tempfilename() and tempfile():
5720         function tempnam() is defined in Visual Studio 6.0 and .NET
5721
5722         * sdcc/sdcc.dsw: removed project sdcpp, added project xa51a
5723
5724         * sdcc/src/src.dsp, sdcc/src/avr/avr.dsp, sdcc/src/ds390/ds390.dsp,
5725           sdcc/src/mcs51/mcs51.dsp, sdcc/src/pic/pic.dsp, sdcc/src/z80/z80.dsp:
5726         - removed compiler command line option /WX: Treats all warnings as errors
5727         - update a list of source files, included into the project
5728
5729         * sdcc/src/avr/avra.dsp, sdcc/src/ds390/ds390a.dsp, sdcc/src/mcs51/mcs51a.dsp,
5730           sdcc/src/pic/pica.dsp, sdcc/src/z80/z80a.dsp:
5731         changed project type to Generic Project so that can be correcly converted to VS.NET project
5732
5733         * sdcc/as/mcs51/asm.h: definition of PATH_MAX for MSC
5734
5735         * sdcc/src/SDCCast.c: solved MSC error in function decorateType()
5736
5737         * sdcc/src/SDCC.y: added missing ending ';' to rules to get rid of bison warnings
5738
5739         * dcc/src/ds390/ralloc.c, sdcc/src/mcs51/ralloc.c:
5740         added return 0 statements after assert() to make compiler happy
5741
5742         * sdcc/src/xa51/peeph.rul, sdcc/src/xa51/peeph.def, sdcc/src/z80/ralloc.c:
5743         added newline in the def file to keep MSC compiler satisfied
5744
5745         * sdcc/src/z80/gen.c:
5746         - function strcasecmp() is not defined in MSC (and probably also in BORLANDC),
5747           so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC
5748         - solved MSC error in function aopDump()
5749
5750         * sdcc_vc.h: define PREFIX as "\\sdcc"
5751
5752 2002-07-18  Bernhard Held <bernhard AT bernhardheld.de>
5753         * src/SDCCast.c (decorateType): fixed access to array of structures http://sourceforge.net/mailarchive/forum.php?thread_id=902690&forum_id=4107
5754
5755 2002-06-22  Scott Dattalo <scott AT dattalo.com>
5756         * src/pic/*: Numerous bug fixes. Flow analysis has been enhanced.
5757         - Rewrote the register banking algorithm.
5758         - Added pCode live-range analysis to registers (for now, only non-used and
5759         singly-used registers optimized away)
5760
5761         * src/pic/pcoderegs.[ch]: Added new files for pCode live-range analysis
5762
5763         * 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.
5764
5765 2002-05-10  Scott Dattalo <scott AT dattalo.com>
5766         * src/pic/*: Added support for multiplication. Fixed many,many bugs.
5767
5768 2002-04-22  Michael Hope  <michaelh AT vroom>
5769
5770         * device/lib/z80/printf.c: Changed emitter to volatile to work around a pcall bug.
5771
5772         * configure.in (DD_COPT): Added include support required for gbdk.
5773
5774         * .version: Bumped version number just to increase it.
5775
5776         * src/SDCCmain.c: Added -nostdinc to the default options.
5777
5778 2002-04-15  Michael Hope  <michaelh AT vroom>
5779
5780         * device/lib/z80/printf.c (sprintf): Added.
5781
5782         * src/z80/ralloc.c (packRegisters): Disabled pack HL use for GB as it's broken.
5783
5784         * src/z80/peeph.def: Added transpose redundent load rule.
5785
5786         * src/z80/main.c: Added force callee saves for jaune.
5787
5788         * src/port.h: Removed the i186 and tlcs-900h ports as they weren't being being developed.
5789
5790         * src/SDCCmain.c: Pulled the options definition out so that you can add port specific options without changing the main file.
5791
5792 2002-03-28  Johan Knol  <johan AT balder>
5793
5794         * src/SDCCval.c: fixed bug #532436
5795
5796 2002-03-14  Scott Dattalo <scott AT dattalo.com>
5797         * /src/port.h:
5798         Added "char *Processor" field to the port structure.
5799
5800         * /src/SDCCmain.c:
5801         Added -p option. Allows port dependent processor to be specified.
5802
5803         * all ports:
5804         Initialized the new field char *Processor field to NULL in all ports
5805
5806         * /src/pic/*:
5807         Compiler generated registers for interrupt context saving
5808         were not getting allocated.
5809
5810 2002-03-16  Sandeep Dutta  <sandeep AT ddi.com>
5811
5812         * /src/SDCCast.c:
5813         Fixed left shift. Will promote the left side of a left shift
5814         if a) left shifting more than size of operand or b) when assigned
5815         to something size > size of left side
5816
5817 2002-03-14  Scott Dattalo <scott AT dattalo.com>
5818         * src/pic/*
5819         tons of changes. Register allocation has been
5820         rewritten. Added customization for the various PICs. Flow
5821         analysis is restructured. ...
5822
5823         * src/pic/device.h:
5824         Added
5825
5826         * src/pic/device.c:
5827         Added. device.c is a PIC port hack to accomodate variations
5828         in PIC devices.
5829
5830 2002-03-13  Michael Hope  <michaelh AT vroom>
5831
5832         * src/z80/gen.c (genGenPointerGet): Fixed a bug where a pointer in HL is dereferenced into HL but HL is not spilled.  Yeah.
5833
5834 2002-03-04  johanknol  <johanknol AT manik>
5835
5836         * /src/SDCCval.c: fixed
5837
5838         const unsigned char arr[][2] = { { 0, 1 } };
5839         t18.c:1: error: Initializer element is not constant
5840
5841 2002-03-04  bela  <bela AT manik>
5842
5843         * /device/include/mcs51reg.h:
5844         ds89c420 register definition update
5845
5846 2002-03-03    <johan AT FRIJA>
5847
5848         * support/Util/SDCCerr.c: did something, but don't no why anymore
5849
5850         * support/regression/tests/bug-524691.c: made it a little less shy
5851
5852         * src/SDCCast.c (decorateType): fixed bug #524697
5853
5854         * src/SDCCast.c: made some lineno improvements
5855
5856         * src/SDCCval.c (getNelements): changed warning to error
5857
5858         * src/SDCCglue.c (printIvalArray): changed warning to error
5859
5860         * src/SDCCicode.c: fixed a warning for mingw
5861
5862         * src/SDCCast.c (decorateType): fixed the << promotion for ops
5863
5864         * src/SDCCicode.c (geniCodeDivision): divide is shift only for unsigned (bug #524685)
5865
5866 2002-03-02  Sandeep Dutta  <sandeep AT ddi.com>
5867
5868         * src/ds390/peeph.def:
5869         Added some more peephole rules
5870
5871         * src/ds390/gen.c: Various fixes & enhancements
5872
5873         * src/SDCClrange.c, src/SDCClrange.h:
5874         functions "alldefsoutofrange" and "notusedinblock" moved to SDCClrange.c
5875
5876         * src/ds390/ralloc.c:
5877         various fixes & enhancements (ds390) specific
5878
5879         * src/avr/ralloc.c, src/mcs51/ralloc.c, src/pic/ralloc.c, src/xa51/ralloc.c, src/z80/ralloc.c:
5880         Functions "allDefsOutOfRange" & "notUsedinBlock" moved to SDCClrange.c
5881         from rallocs.
5882
5883         * sdcc/src/SDCCcse.c: Better fix for bug # 514308
5884
5885 2002-03-02    <johan AT FRIJA>
5886
5887         * src/SDCCast.c (decorateType): fixed bug #524708
5888
5889         * src/SDCCval.c (floatFromVal): fixed the literal void (whatever that may be)
5890
5891         * src/SDCCicode.c (geniCodePtrPtrSubtract): fixed bug #524691
5892
5893 2002-03-01  Michael Hope  <michaelh AT vroom>
5894
5895         * src/SDCCsymt.c (initCSupport): Removed managling of support function names.
5896
5897         * src/z80/ralloc.c (packRegsForIYUse): Fixed fp bug where four byte operands were packed into IY.
5898
5899 2002-03-01    <johan AT FRIJA>
5900
5901         * src/SDCCglue.c (printIvalPtr): fixed bug #524211
5902
5903         * src/SDCCast.c (decorateType): fixed bug #524209
5904
5905         * src/SDCCval.c (valNot): fixed bug #524195
5906
5907 2002-02-26    <johan AT balder>
5908
5909         * src/xa51/gen.c: fixed a warning
5910
5911         * src/SDCCglue.c (printIvalFuncPtr): fixed bug #522534
5912
5913         * src/SDCCast.c (decorateType): fixed bug #522534
5914
5915 2002-02-23    <johan AT balder>
5916
5917         * src/SDCCdflow.c (computeDataFlow): fixed bug #460088
5918
5919 2002-02-22    <johan AT balder>
5920
5921         * src/SDCCast.c: fixed bug #514865
5922
5923         * src/SDCCy.c ("SDCC.y"): fixed bug #516625
5924
5925 2002-02-21  Sandeep Dutta  <sandeep AT ddi.com>
5926
5927         * sdcc/src/SDCCloop.c:
5928         Previous fix was not good. basic blocks that have "break" or "return" are
5929         not really partof a loop , but live ranges used in these blocks should
5930         be live thru the entire loop, so set partOfLoop but don't add them to
5931         loop region
5932
5933 2002-02-21    <johan AT FRIJA>
5934
5935         * src/SDCCcse.c: fixed bug #514308
5936
5937 2002-02-20  Sandeep Dutta  <sandeep AT ddi.com>
5938
5939         * src/SDCCloop.c:
5940         Fixed BUG #519583. If a conditional block ended in a return/break
5941         statement inside a loop, it was not being considered part of the loop.
5942
5943         * src/SDCCcflow.c: Removed fix (Fixed in SDCCloop.c)
5944
5945 2002-02-10  Karl Bongers <karl AT turbobit.com>
5946
5947         * debugger/*:
5948         Fixed up SDCDB debugger somewhat.  Updated debugger/README
5949         with lots of comments and notes.
5950
5951         * device/examples/test2.c:
5952         Fix bug, "red" variable not being initialized(compiler complained).
5953
5954         * device/examples/Makefile, examples/test3.c:
5955         Add Makefile in device/examples folder, compiles test3.c
5956         for use as a multiple module SDCDB test case.
5957
5958         * sim/ucsim/cmd.src/cmdset.cc:
5959         Took out debug printfs in ucsim "next" command.
5960
5961         * sim/ucsim/xa.src:
5962         Karl and Johan start ucsim XA support.  Most dissassembly working,
5963         about 75% emulation done(plenty of work remaining).
5964
5965         * sim/ucsim/z80.src:
5966         Add Z80 support to ucsim, add test-ucz80 regression test,
5967         notice ucsim/z80 emulation fails on examples/test3.c/itoa code.
5968         Notice z80 compiler fails on examples/test3.c/crc code.
5969
5970 2002-01-30  Sandeep Dutta  <sandeep AT ddi.com>
5971
5972         * src/mcs51/gen.c, src/mcs51/main.c, src/mcs51/ralloc.c:
5973         Added support for --parms-in-bank1
5974
5975         * src/ds390/peeph.def:
5976         added a few more peephole optimzations
5977
5978         * src/ds390/main.c:
5979         1) added __builtin_inp & __builtin_outp used to read in data of given length
5980            from a memory mapped port
5981         2) added __builtin_memcmp
5982         3) added __builtin_swapw swap bytes of a short
5983
5984         * src/ds390/gen.c, src/ds390/gen.h, src/ds390/ralloc.c:
5985         1) handle multiple send & receives from register bank1
5986         2) ralloc can now allocate DPTR1 to some liveRanges
5987
5988         * src/SDCCsymt.c, src/SDCCsymt.h:
5989         changes to handle multiple sends & receives
5990
5991         * src/SDCCptropt.h:
5992         added some pointer arithmetic optimization
5993
5994         * src/SDCCptropt.c:
5995         added some pointer arithmetic optimizations but not stable yet so not
5996         called from anywhere (will get this working shortly)
5997
5998         * src/SDCCopt.c: fixed for multiple sends & receives
5999
6000         * src/SDCCmain.c:
6001         1) added options --parms-in-bank1 (ds390/mcs51) & --protect-sp-update
6002         2) preprocessing done AFTER port->finalizeoptions . This allows ports to
6003            set preprocessor defines (depending on options)
6004
6005         * src/SDCCicode.c, src/SDCCicode.h:
6006         changes made to handle multiple sends & receives
6007
6008         * src/SDCCglobl.h:
6009         Added options --protect-sp-update (ds390) and --parms-in-bank1 (ds390/mcs51)
6010
6011         * src/SDCCcse.c, src/SDCCcse.h:
6012         added function findbackward def (to be used in upcoming optimization)
6013
6014         * src/SDCCcflow.c, src/SDCCcflow.h:
6015         added function returnAtEnd - to determine if a basic block terminates with
6016         a RETURN iCode
6017
6018         * src/SDCCast.c, src/SDCCast.h:
6019         added option parms-in-bank1
6020
6021         * device/lib/_divsint.c, device/lib/_divslong.c, device/lib/_divuint.c
6022         * device/lib/_divulong.c, device/lib/_modsint.c, device/lib/_modslong.c
6023         * device/lib/_modulong.c, device/lib/_mulint.c, device/lib/_mullong.c:
6024         adjusted for --parms-in-bank1 option
6025
6026         * device/include/string.h:
6027         donot redefine "reentrant" keyword
6028
6029         * device/include/ds80c390.h: Added some more SFRs
6030
6031 2002-01-28  Bernhard Held  <bernhard AT bernhardheld.de>
6032
6033         * sim/ucsim: Merged branch ucsim-034-pre3 to main trunk; new version 0.4
6034
6035 2002-01-26  Bernhard Held  <bernhard AT bernhardheld.de>
6036
6037         * src/SDCCast.c (funcOfType): fix usage of double --float-reent
6038
6039 2002-01-22  Bernhard Held  <bernhard AT bernhardheld.de>
6040
6041         * support/regression/fwk/lib/testfwk.c (main): Removed workaround for bug #505387
6042
6043 2002-01-18  Paul Stoffregen  <paul AT pjrc.com>
6044
6045         * Added --xram-movc option
6046
6047 2002-01-13  Bernhard Held  <bernhard AT bernhardheld.de>
6048
6049         * support/regression/Makefile: don't include test-mcs51-stack-auto in target all
6050
6051 2002-01-11  Johan Knol
6052
6053         * Added math lib of Jesus Calvino-Fraga
6054
6055 2002-01-08  Bernhard Held  <bernhard AT bernhardheld.de>
6056
6057         * src/SDCCmain.c (processFile): fix processing of ../../src.c
6058         * support/regression/Makefile: new target test-mcs51-stack-auto
6059         * support/regression/ports/mcs51-stack-auto/spec.mk: added
6060
6061 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
6062
6063         * src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
6064
6065 2002-01-04  Bernhard Held  <bernhard AT bernhardheld.de>
6066
6067         * support/regression/ports/mcs51/support.c: correct setup of timer / UART
6068
6069 2002-01-03  Bernhard Held  <bernhard AT bernhardheld.de>
6070
6071         * src/SDCCsymt.c (processFuncArgs): fix #498307 by Johan
6072
6073         * src/SDCCglue.h: add definition for printIvalChar()
6074
6075 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
6076
6077         * src/SDCCast.c: fix #498138 by Johan
6078
6079         * src/SDCCglue.c: fix #498138 by Johan
6080
6081 2002-01-02  Bernhard Held  <bernhard AT bernhardheld.de>
6082
6083         * support/regression/Makefile: fix clean
6084
6085         * support/regression/ports/ds390/support.c: fix transmission of last character
6086
6087 2001-12-29  Sandeep Dutta  <sandeep AT ddi.com>
6088
6089         * /sdcc/src/ds390/gen.c:
6090         a) improved computing address of stack variable
6091         b) took out some #if 0 code
6092         c) improved parmBytes adjustment
6093         d) improved genPlusIncr & genMinusIncr
6094         e) genCmp could generate bad code (when left assigned to DPTR)
6095         f) Fixed bug in hasInc
6096
6097         * /sdcc/src/ds390/ralloc.c:
6098         a) packRegsForSupport could mess up live information (Fixed)
6099         b) packRegsDPTRuse could be incorrect for left & right shift
6100
6101         * /sdcc/src/mcs51/ralloc.c:
6102         packRegsForSupport could mess up the live information (Fixed)
6103
6104         * /sdcc/src/mcs51/gen.c: Fixed a bug in hasInc
6105
6106         * /sdcc/src/SDCCast.c:
6107         can reverse a loop even if function call is present as long
6108         as the loop control variable is local & is not passed as parameter
6109
6110 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
6111
6112         * /sdcc/ChangeLog: *** empty log message ***
6113
6114         * /sdcc/src/ds390/gen.c, /sdcc/src/ds390/main.c:
6115         More builtin function additions for TININative
6116
6117         * /sdcc/src/ds390/ralloc.c:
6118         Had broken the regression testsuite
6119
6120         * /sdcc/src/SDCCast.c: Fixed a bug in dumptree
6121
6122         * /sdcc/src/SDCCsymt.c, /sdcc/src/SDCCsymt.h:
6123         Added funcattr hasStackParms will be set for reentrant functions when there
6124         are paramteres on the stack, this helps in minimizing frame pointer generation
6125         typeFromStr can handle function pointers now
6126
6127         * /sdcc/doc/builtins.txt, /sdcc/doc/TININative.txt:
6128         *** empty log message ***
6129
6130 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
6131
6132         * /src/ds390/gen.c, /src/ds390/main.c:
6133         More builtin function additions for TININative
6134
6135         * /src/ds390/ralloc.c:
6136         Had broken the regression testsuite
6137
6138         * /src/SDCCast.c: Fixed a bug in dumptree
6139
6140         * /src/SDCCsymt.c, /src/SDCCsymt.h:
6141         Added funcattr hasStackParms will be set for reentrant functions when there
6142         are paramteres on the stack, this helps in minimizing frame pointer generation
6143         typeFromStr can handle function pointers now
6144
6145         * /doc/builtins.txt, /doc/TININative.txt:
6146         *** empty log message ***
6147
6148
6149 2001-12-24  Sandeep Dutta  <sandeep AT ddi.com>
6150
6151         * /src/ds390/gen.c, /src/ds390/main.c, /src/ds390/peeph.def, /src/ds390/ralloc.c:
6152         ALPHA version for -mTININative
6153
6154         * /src/izt/i186.c, /src/izt/tlcs900h.c, /src/mcs51/main.c, /src/pic/main.c, /src/z80/main.c, /src/avr/main.c:
6155         updated to reflect changes in the port structure
6156
6157         * /src/port.h:
6158         added function do_assemble (similar to do_link) if non-null this function
6159         will be called to do assembly (-mTININative) requires a multi command
6160         assembly
6161         added function genAssemblerEnd will be called to generate assembler Epilogue
6162
6163         * /src/SDCCsymt.c:
6164         added _JavaNative to debug info printing
6165
6166         * /src/SDCCmain.c: added option --tini-libid
6167         added port->do_assemble function (-mTININative) has a multi command assemble
6168
6169         * /src/SDCCglue.c: Disabled "constExpr" check
6170         added port->genAssemblerEnd function
6171
6172         * /src/SDCCglobl.h: Added option --tini-libid value
6173
6174         * /src/SDCCast.h:
6175         tookout optimizeCompare from the header (has no external references)
6176
6177         * /src/SDCCast.c: made one more function "static"
6178
6179 2001-12-23  Michael Hope  <michaelh AT juju.net.nz>
6180
6181         * src/z80/mappings.i: Added z80asm support.
6182
6183         * src/z80/main.c: Added z80asm support on --asm=z80asm
6184
6185         * src/z80/gen.c: Fixed asm portability issues.
6186
6187         * src/asm.c (tvsprintf): Removed old code, added 'N' for function name.  For extern support.
6188
6189         * src/SDCCglue.c (printExterns): Added global/extern split.
6190
6191 2001-12-17  Bernhard Held  <bernhard AT bernhardheld.de>
6192
6193         * support/regression/Makefile: added test for mcs51 model large
6194
6195         * support/regression/ports/mcs51-large/spec.mk: added test for mcs51 model large
6196
6197         * support/regression/ports/gbz80/spec.mk: added -mgbz80
6198
6199 2001-12-05  Michael Hope  <michaelh AT juju.net.nz>
6200
6201         * src/diff.1 (Index): Many, many optmisiations.  Dhrystone up to 201.
6202
6203 1904-01-06  Michael Hope  <michaelh AT juju.net.nz>
6204
6205         * src/z80/ralloc.c (packRegsForIYUse): Fixed the case where an operand is in direct space.
6206
6207         * src/z80/gen.c (makeFreePairId): Optimised IY load by using a spare pair.
6208
6209 2001-12-02  Bernhard Held  <bernhard AT bernhardheld.de>
6210
6211         * src/mcs51/gen.c (genFunction): avoid excess "inc sp"
6212
6213         * support/regression/tests/simplefloat.c: Port to mcs51.
6214
6215 2001-11-25  Michael Hope  <michaelh AT juju.net.nz>
6216         * support/regression/tests/bug-485362.c: Added.
6217
6218         * support/regression/tests/simplefloat.c (testDivNearOne): Added.
6219
6220         * src/z80/gen.c (aopOp): Fixed case where left and result are in the same spill loc and they have different sizes.
6221
6222         * src/z80/peeph.def: Added rules for optimising two byte compares on the same thing, and to optimise two ptr assign.
6223
6224         * src/z80/gen.c (aopDump): Added a dump function.
6225
6226 2001-11-25  Bernhard Held  <bernhard AT bernhardheld.de>
6227         * sim/ucsim/s51.src/glob.cc: DS390 SFRs and bits added.
6228
6229         * sim/ucsim/s51.src/port.cc: Port 4 and 5 added.
6230
6231         * sim/ucsim/s51.src/regs51.h: DS390 SFRs added.
6232
6233         * sim/ucsim/s51.src/uc390.cc: Some details improved, CKRDY works for tinibios.
6234
6235         * sim/ucsim/s51.src/uc390cl.h: Work in progress.
6236
6237         * sim/ucsim/sim.src/uccl.h: 6 ports for DS390.
6238
6239         * support/regression/fwk/lib/testfwk.c: Run with tinibios.
6240
6241         * support/regression/ports/mcs51/spec.mk: Fine tuninig.
6242
6243         * support/regression/ports/ds390/support.c: Use tinibios.
6244
6245         * support/regression/ports/ds390/spec.mk: Fine tuning, use tinibios.
6246
6247 2001-11-23  Michael Hope  <michaelh AT juju.net.nz>support/regression/tests/bug-460010.c
6248
6249         * src/z80/ralloc.c (packRegsForHLUse3): Changed to not pack into HL if anything is in direct space.
6250         (packRegsForHLUse3): Added packing support for send, cast, and return value from a call.
6251
6252         * src/z80/peeph.def: Added rules for optimising pushes of part of a pair.
6253
6254         * src/z80/gen.c (emitCall): Changed the stack fixup to not use HL.
6255
6256 2001-11-18  Michael Hope  <michaelh AT juju.net.nz>
6257
6258         * src/z80/gen.c (genCmp): Fixed compare on unsigned.
6259
6260         * src/z80/ralloc.c (packRegsForHLUse3): Created and optimised.
6261         (packRegsForIYUse): Created and optimised.
6262
6263 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
6264
6265         * support/regression/tests/float.c (testFloatAdd): Fixed up warning.
6266 2001-11-18  Bernhard Held  <bernhard AT bernhardheld.de>
6267
6268         * sdcc/support/regression/tests/bug-460010.c: fix seg violation on host
6269
6270         * sdcc/support/regression/tests/muldiv.c: fix output on mcs51
6271
6272         * sdcc/support/regression/tests/stacks.c: fix DSEG overflow on mcs51
6273
6274 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
6275
6276         * sdcc/sim/device/lib/_gptrget.c: mem region 5 (idata) added
6277
6278         * sdcc/sim/device/lib/_gptrput.c: mem region 5 (idata) added
6279
6280 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
6281
6282         * sdcc/sim/ucsim/globals.cc: New: IXRAM.
6283
6284         * sdcc/sim/ucsim/stypes.h: New: IXRAM.
6285
6286         * sdcc/sim/ucsim/s51.src/uc390.cc: New: IXRAM.
6287
6288 2001-11-07  Michael Hope  <michaelh AT juju.net.nz>
6289
6290         * src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
6291         (packRegsForHLUse): Added rule to pack address of/pointer get for itemps into HL for the Z80.
6292         (packRegsForAccUse2): Added rule to pack hbit IFXs into A.
6293
6294         * src/z80/main.c (_setDefaultOptions): Made float code re-entrant by default.
6295
6296         * src/z80/gen.c (aopGetLitWordLong): Added word support for floats.
6297         (genNotFloat): Added.
6298         (genUminusFloat): Added.
6299
6300         * device/lib/z80/Makefile: Added floating pt stubs.
6301
6302         * device/lib/Makefile.in (Z80SOURCES): Added floating pt support.
6303
6304         * src/z80/gen.c (genIpush): Fixed up a push of one byte when left is in a pair.
6305
6306         * device/lib/_fsadd.c (__fsadd): Fixed up return where the numbers are hugely different.
6307
6308 2001-11-07  Bernhard Held  <bernhard AT bernhardheld.de>
6309
6310         * sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
6311
6312         * sdcc/sim/ucsim/s51.src/regs51.h: Minor fix.
6313
6314         * sdcc/support/regression/Makefile: Add port ds390.
6315
6316         * sdcc/support/regression/ports/mcs51/spec.mk: Minor change.
6317
6318         * sdcc/support/regression/ports/z80/spec.mk: Minor change.
6319
6320         * sdcc/support/regression/ports/ds390/spec.mk: Added.
6321
6322         * sdcc/support/regression/ports/ds390/support.c: Added.
6323
6324         * sdcc/support/regression/ports/ds390/uCsim.cmd: Added.
6325
6326         * sdcc/support/regression/ports/mcs51/timeout.c: Cut.
6327
6328         * sdcc/support/regression/fwk/lib/timeout.c: Paste.
6329
6330 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
6331
6332         * device/include/malloc.h: Added z80 and gbz80 support.
6333
6334         * device/lib/gbz80/heap.s: Added.
6335
6336         * device/lib/z80/heap.s: Added.
6337
6338         * device/lib/malloc.c: Added z80 and gbz80 support.
6339
6340         * support/regression/tests/malloc.c (testMalloc): Added.
6341
6342         * src/SDCCmain.c (parseCmdLine): Added support for -Wp.
6343
6344         * support/regression/tests/bug-478094.c: Added.
6345
6346         * src/z80/gen.c (commitPair): Fixed silly gbz80/z80 commit to static bug.
6347
6348 2001-11-04  Bernhard Held  <bernhard AT bernhardheld.de>
6349
6350         * sdcc/sim/ucsim/s51.src/uc390cl.h: Improvement for ds390 to run regression tests
6351
6352         * sdcc/sim/ucsim/s51.src/uc390.h: Improvement for ds390 to run regression tests
6353
6354         * sdcc/sim/ucsim/s51.src/regs51.h: Improvement for ds390 to run regression tests
6355
6356         * sdcc/sim/ucsim/s51.src/glob.cc: Improvement for ds390 to run regression tests
6357
6358         * sdcc/support/regression/tests/bug-460010.c: Small change for ds390
6359
6360 2001-11-04  Michael Hope  <michaelh AT juju.net.nz>
6361
6362         * src/z80/peeph-gbz80.def: Removed a bad sub optimisation.
6363
6364 2001-11-03  Michael Hope  <michaelh AT juju.net.nz>
6365
6366         * support/regression/tests/bug-477927.c: Added.
6367
6368         * src/z80/peeph.def: Added minor rules.
6369
6370         * src/z80/gen.c (genPlusIncr): Added an extra plusinc rule.
6371
6372         * src/z80/peeph.def: Added jump optimisation modification.
6373
6374 2001-11-01  Michael Hope  <michaelh AT juju.net.nz>
6375
6376         * src/SDCCmain.c (linkEdit): Added runtime path detection to the mcs51 port.
6377
6378 2001-10-30  Michael Hope  <michaelh AT juju.net.nz>
6379
6380         * support/regression/tests/funptrs.c: Added.
6381
6382 2001-10-29  Michael Hope  <michaelh AT juju.net.nz>
6383
6384         * src/z80/ralloc.c (packRegsForHLUse): Fixed up bad spill due to pushing one byte via HL.
6385
6386 2001-10-28  Michael Hope  <michaelh AT juju.net.nz>
6387
6388         * src/z80/gen.c (genArrayInit): Made it work for on stack arrays.
6389
6390         * src/z80/main.c (gbz80_port =): Added rle support to the gbz80 port.
6391
6392         * src/z80/gen.c (genMinus): Fixed for where the result is one byte.
6393         (movLeft2ResultLong): Created.
6394
6395         * src/z80/ralloc.c (packRegsForHLUse): Added a couple of simple cases for the GB.
6396         (joinPushes): Added.  Joins two char pushes into a word push.
6397
6398 2001-10-27  Michael Hope  <michaelh AT juju.net.nz>
6399
6400         * support/cpp2/Makefile.in (install): Added creation of dest dir.
6401
6402         * support/makebin/Makefile (install): Added creation of dest dir.
6403
6404 2001-10-24 Karl Bongers <karl AT turbobit.com>
6405
6406         * configure.in, configure, Makefile, support/cpp: Removed cpp folder, since we have new cpp2 preprocessor code.
6407
6408 2001-10-21  Michael Hope  <michaelh AT juju.net.nz>
6409
6410         * src/z80/ralloc.c: Turned off faulty pack for one use.
6411
6412         * src/z80/peeph-gbz80.def: Removed redundent restart options.
6413
6414         * src/z80/gen.c (genMult): Added native mul for constants on the z80 and gbz80.
6415
6416 2001-10-21  Bernhard Held  <bernhard AT bernhardheld.de>
6417
6418         * support/regression/Makefile: Improved clean
6419
6420         * support/regression/ports/gbz80/spec.mk: Added clean
6421
6422         * support/regression/ports/host/spec.mk: Added clean
6423
6424         * support/regression/ports/z80/spec.mk: Added clean
6425
6426         * support/regression/ports/mcs51/spec.mk: Added clean, little improvements
6427
6428         * support/regression/ports/mcs51/timeout.c: little improvements
6429
6430 2001-10-17  Michael Hope  <michaelh AT juju.net.nz>
6431
6432         * device/lib/malloc.c (MEMHEADER): Fixed against new pedantic pointers.
6433
6434         * support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
6435
6436         * support/regression/generate-cases.py: Fixed up to use function pts correctly.
6437
6438 2001-10-16  Bernhard Held  <bernhard AT bernhardheld.de>
6439
6440         * support/regression/port/mcs51/spec.mk: add timeout for uCsim
6441
6442         * support/regression/port/mcs51/timeout.c: add timeout for uCsim
6443
6444 2001-10-13  Michael Hope  <michaelh AT juju.net.nz>
6445         * src/z80/gen.c (emitCall): Fixed up missing spill of HL when used to assign the result value.
6446
6447         * src/z80/ralloc.c: Turned off pack for one use as it's quite broken.
6448
6449         * src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through the processor.
6450
6451         * src/mcs51/main.c (_linkCmd): Added bin path to command.
6452
6453         * src/SDCCmain.c (initValues): Added support for when it it called just to link.
6454
6455         * as/mcs51/lklibr.c (libfil;): Turned off 'library file' message.
6456
6457         * src/SDCCval.c (constVal): Fixed usage of 'L' modifier problems on ppc.
6458
6459         * support/regression/tests/longor.c: Added.
6460
6461 2001-10-11  Bernhard Held  <bernhard AT bernhardheld.de>
6462
6463         * as/mcs51/asdata.c: replaced FILENAME_MAX with PATH_MAX
6464
6465         * as/mcs51/aslink.h: define PATH_MAX
6466
6467         * as/mcs51/asm.h: define PATH_MAX
6468
6469         * as/mcs51/asmain.c: replaced FILENAME_MAX with PATH_MAX
6470
6471         * as/mcs51/asnoice.c: replaced FILENAME_MAX with PATH_MAX
6472
6473         * as/mcs51/lklex.c: replaced FILENAME_MAX with PATH_MAX
6474
6475         * as/mcs51/lkmain.c: replaced FILENAME_MAX with PATH_MAX
6476
6477         * src/SDCCglobl.h: define PATH_MAX
6478
6479         * src/SDCCmacro.c: replaced FILENAME_MAX with PATH_MAX
6480
6481         * src/SDCCmain.c: replaced FILENAME_MAX with PATH_MAX
6482
6483 2001-10-11  Michael Hope  <michaelh AT juju.net.nz>
6484
6485         * src/z80/gen.c (gencjneshort): Fixed
6486
6487         * src/z80/ralloc.c (packRegsForHLUse): Added pack into HL for cast then ipush.
6488
6489 2001-10-09  Michael Hope  <michaelh AT juju.net.nz>
6490
6491         * support/regression/tests/bug-469671.c: Added.
6492
6493         * src/z80/gen.c (shiftIntoPair): Fixed up warning.
6494
6495 2001-10-08  Michael Hope  <michaelh AT juju.net.nz>
6496
6497         * src/SDCCmain.c: Added --fommit-frame-pointer option and implemented in the z80 port.
6498
6499         * src/z80/gen.c (genPlus): Fixed to work with extended stack.  Also fixed genMinus, genCmp.  genUMinus is still left.
6500
6501 2001-10-08  Bernhar Held  <bernhard AT bernhardheld.de>
6502
6503         * src/SDCCmain.c (preProcess): added define SDCC_NOOVERLAY
6504
6505         * src/device/lib/_mulint.c  : removed hint: nooverlay bug
6506
6507         * src/device/lib/_mullong.c : removed hint: nooverlay bug
6508
6509         * src/device/lib/_divuint.c : removed hint: nooverlay bug
6510
6511         * src/device/lib/_divulong.c: removed hint: nooverlay bug
6512
6513         * src/device/lib/_moduint.c : removed hint: nooverlay bug
6514
6515         * src/device/lib/_modulong.c: removed hint: nooverlay bug
6516
6517 2001-10-07  Michael Hope  <michaelh AT juju.net.nz>
6518
6519         * 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.
6520
6521         * support/Util/NewAlloc.c (freeTrace): Changed free for the gc case to not free at all.  Fixes runtime segfault.
6522
6523         * support/regression/tests/scott-compare3.c (c_abcd): Fixed up casts.
6524
6525 2001-10-07    <johan AT FRIJA>
6526
6527         * device/lib/gets.c (gets): fixed the return value.
6528
6529 2001-10-06  Michael Hope  <michaelh AT juju.net.nz>
6530         * src/SDCCmain.c (WRITE_SEG_LOC): Fixed up to use Safe_strdup.
6531
6532         * 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.
6533
6534         * 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.
6535
6536         * src/z80/gen.c (genZ80Code): Added de-allocation via trace support.
6537
6538         * src/pic/gen.c: Removed Safe_strdup.
6539
6540         * configure.in: Added option to enable libgc support.
6541
6542         * src/SDCCbitv.c (bitVectnBitsOn): Optimised.
6543         (bitVectUnion): Optimised.
6544         (bitVectIntersect): Optimised.
6545         (bitVectBitsInCommon): Optimised.
6546         (bitVectCplAnd): Optimised.
6547
6548         * support/makebin/makebin.c (usage): Removed getopt as mingw32 doesn't have it.  Sigh.
6549
6550 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
6551
6552         * src/SDCCmain.c: distinguish between assembler debug and plain options
6553
6554         * src/avr/main.c:   remove standard assembler options
6555
6556         * src/ds390/main.c: remove standard assembler options
6557
6558         * src/mcs51/main.c: remove standard assembler options
6559
6560         * src/port.h: removed "PENDING" comment
6561
6562 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
6563
6564         * src/device/lib/_mulint.c  : new, with assember functions
6565
6566         * src/device/lib/_mullong.c : new, with assember functions
6567
6568         * src/device/lib/_divuint.c : with assember functions
6569
6570         * src/device/lib/_divsint.c : with assember functions
6571
6572         * src/device/lib/_divulong.c: with assember functions
6573
6574         * src/device/lib/_divslong.c: with assember functions
6575
6576         * src/device/lib/_moduint.c : with assember functions
6577
6578         * src/device/lib/_modsint.c : with assember functions
6579
6580         * src/device/lib/_modulong.c: with assember functions
6581
6582         * src/device/lib/_modslong.c: with assember functions
6583
6584         * src/device/lib/libint.lib:  replaced _muluint.c  and _mulsint.c  by _mulint.c
6585
6586         * src/device/lib/liblong.lib: replaced _mululong.c and _mulslong.c by _mullong.c
6587
6588         * src/device/lib/Makefile.in: replaced _muluint.c  and _mulsint.c  by _mulint.c
6589                                       replaced _mululong.c and _mulslong.c by _mullong.c
6590
6591 2001-10-03 Bernhard Held <bernhard AT bernhardheld.de>
6592
6593         * src/SDCCsymt.c: sequence of specifiers in pintTypeChain() corrected
6594
6595 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
6596
6597         * src/SDCCglue.c: test, if win32api is available for MINGW
6598
6599 2001-10-01 Bernhard Held <bernhard AT bernhardheld.de>
6600
6601         * src/SDCCsymt.c: no more _modifier in printTypeChain()
6602         * support/regression/tests/driverstruct.c: REENTRANT for mcs51
6603         * support/regression/ports/gbz80/spec.mk: removed GENERIC
6604         * support/regression/ports/host/spec.mk: removed GENERIC
6605         * support/regression/ports/mcs51/spec.mk: removed GENERIC
6606         * support/regression/ports/z80/spec.mk: removed GENERIC
6607
6608 2001-10-01  Michael Hope  <michaelh AT juju.net.nz>
6609
6610         * support/regression/fwk/lib/testfwk.c (__printf): Removed GENERIC.
6611
6612         * support/regression/tests/bug-467035.c: Created.
6613
6614 2001-10-01    <johan AT FRIJA>
6615
6616         * src/SDCC.y: fixed bug #466586 part 1
6617
6618 2001-10-01  Johan Knol <johan.knol AT iduna.nl>
6619
6620         * SDCCicode.c: z80 has no generic pointers
6621         * removed -s from strip in all Makefile(.in)'s. It is not needed, but Solaris chocks on it.
6622
6623 2001-09-30  Michael Hope  <michaelh AT juju.net.nz>
6624
6625         * sim/ucsim/cmd.src/Makefile.in ($(PRJDIR)/libcmd.a): Changed all ar references to $(AR) for Solaris.
6626
6627 2001-09-29  Michael Hope  <michaelh AT juju.net.nz>
6628
6629         * Makefile (sdcc-libs): Added makebin to the list of standard targets.
6630
6631         * support/regression/ports/z80/spec.mk: Updated to use env for sdcc bin dir for automatic regression.
6632
6633 2001-09-25  Michael Hope  <michaelh AT juju.net.nz>
6634
6635         * configure.in: Fixed up so that ucsim is only configured once.
6636
6637         * support/cpp2/configure.in: Fixed to use the program transform to append the .exe for the win32 build.
6638
6639         * src/SDCCutil.c (getPrefixFromBinPath): Fixed up to work with win32 in all of its glory.
6640         (getPathDifference): As above.
6641
6642         * src/SDCCmain.c (preProcess): Changed to use a temporary file in a proper temp directory.  Fixed case where pre-processing only.
6643
6644         * src/SDCCglue.c (tempfilename): Added function for pre-processor.
6645
6646 2001-09-23  Michael Hope  <michaelh AT juju.net.nz>
6647         * .version: Updated to 2.3.1
6648
6649         * src/z80/main.c (z80_port =): Added macro based linker and assembler command line support.
6650         Added copyright header.
6651
6652         * src/SDCCmain.c: Shifted various functions into SDCCutil.c
6653         (assemble): Added support for macro based assembler commands.
6654         (linkEdit): Added support for macro based linker commands.
6655         (preProcess): Changed the pre-processor to use macros.
6656         (_setPaths): Added functionality to autodetect the include, lib and bin dir paths.
6657         (_discoverPaths): Added support for overriding the install directory using the SDCCDIR env variable.
6658
6659         * device/lib/z80/crt0.s: Added module name for debugging.
6660
6661 2001-09-20  Michael Hope  <michaelh AT juju.net.nz>
6662
6663         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
6664
6665         * src/SDCChasht.c (hTabDeleteByKey): Fixed delete as it would delete the last item from a bucket even if it wasn't the real one.
6666
6667         * src/SDCCglue.c: Moved gc_strdup to SDCCutil.c
6668
6669         * src/Makefile.in: Added SDCCmacro and SDCCutil
6670
6671 2001-09-19  Michael Hope  <michaelh AT juju.net.nz>
6672
6673         * src/SDCCmain.c (printVersionInfo): Added the build date to the version info.
6674
6675 2001-09-16    <johan AT FRIJA>
6676
6677         * 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.
6678
6679 2001-09-15    <johan AT FRIJA>
6680
6681         * src/mcs51/ralloc.c: (findAssignToSym): fixed bug #460662 part 1
6682         * src/ds390/ralloc.c (findAssignToSym): fixed bug #460662 part 1
6683
6684 2001-09-11    <johan AT FRIJA>
6685
6686         * src/SDCCval.c (valDiv Mod Minus Plus Shift): keep litteral expressions as small as possible (bug #460010)
6687
6688 2001-09-10  Michael Hope  <michaelh AT juju.net.nz>
6689
6690         * support/regression/tests/bug-460444.c: Added test case.
6691
6692         * src/z80/gen.c (genOr): bug 460444: if (a ^ lit) was broken for &, |, and ^.
6693         (genCast): Added justification for all of the asserts.
6694
6695 2001-09-10  Bernhard Held <bernhard AT bernhardheld.de>
6696
6697         * support/regression/support.c: _xdata replaced by xdata
6698
6699         * support/regression/spec.mk: removed _generic
6700
6701 2001-09-09  Michael Hope  <michaelh AT juju.net.nz>
6702
6703         * src/pic/ralloc.c (debugLogRegType): Removed some old types to get it to compile.
6704
6705         * src/z80/gen.c (shiftR2Left2Result): Improved the case when v = v >> n for small values of n to use less code space and time.
6706         (genrshTwo): Fixed v = v >> n where v is a negative int and n is > 8: bug 460010.
6707
6708         * src/z80/peeph.def: Added a rule to optimise shift then compare.
6709
6710         * support/regression/tests/bug-460000.c (testShiftByParam): Added test case.
6711
6712         * support/regression/tests/bug-460010.c: Added test case.
6713
6714         * support/regression/Makefile (test-host): Removed a silly 'clean' target when testing against gcc.
6715
6716 2001-09-09  Bernhard Held <bernhard AT bernhardheld.de>
6717
6718         * support/regression/Makefile: inter-port-clean adjusted for mcs51
6719
6720         * support/regression/testfwk.c: removed workaround for bug #436344
6721
6722         * support/regression/tests/bp.c: use less memory with mcs51
6723
6724         * support/regression/tests/bug-441448.c: use less memory
6725
6726         * support/regression/tests/ports/mcs51/spec.mk: cleanup, use --stack-after-data
6727
6728         * support/regression/collate-results.py: typo
6729
6730 2001-09-08  Michael Hope  <michaelh AT juju.net.nz>
6731
6732         * support/regression/tests/fetchoverlap.c: Added new test case.
6733
6734         * support/regression/tests/bp.c: Added new test case.
6735
6736         * support/regression/tests/bug-448984.c: Added new test case.
6737
6738         * support/regression/tests/pow2shifts.c: Added new test case.
6739
6740         * src/z80/gen.c: Turned off the noise it normally generates for the release.
6741         (genlshTwo): Fixed right shift for count > 8.
6742
6743         * src/z80/ralloc.c: Disabled most of the ACC packing rules as they weren't getting hit and weren't at all safe.
6744
6745 2001-09-08    <johan AT FRIJA>
6746
6747         * src/SDCCicode.c (geniCodeCall): a CPOINTER can be used as a function
6748
6749 2001-09-07    <johan AT FRIJA>
6750
6751         * src/SDCCicode.c (newiCodeCondition): fixed bug #456235 (1.77)
6752
6753         * src/SDCCglue.c (emitRegularMap): only delete a symbol when it is a symbol
6754
6755 2001-09-06    <johan AT FRIJA>
6756
6757         * src/SDCC.y: this could be a fix for bug #458744 (1.37)
6758         * bernhard noted me at this: "() equals to (void)" (1.38)
6759
6760 2001-09-05    <johan AT FRIJA>
6761
6762         * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
6763
6764 2001-09-04    <johan AT FRIJA>
6765
6766         * src/SDCCsymt.c (checkSClass): a fix for bug #458099/1
6767
6768
6769 2001-09-04  Paul Stoffregen  <paul AT pjrc.com>
6770
6771         * pragma noinduction broke memcpy on mcs51 large model.  Moved it inside z80 optimization
6772
6773 2001-09-03  Michael Hope  <michaelh AT juju.net.nz>
6774
6775         * link/z80/aslink.h: Fixed path for PATH_MAX
6776
6777 2001-09-02  Michael Hope  <michaelh AT juju.net.nz>
6778
6779         * src/z80/gen.c (fetchLitPair): Changed so that it properly caches direct space references.
6780
6781         * support/regression/tests/addsub.c: Added cases to cover all the +, - combinations.
6782
6783         * support/regression/tests/uminus.c: Added a test for the unary minus operator.
6784
6785         * 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.
6786
6787 2001-09-01  Michael Hope  <michaelh AT juju.net.nz>
6788
6789         * src/z80/gen.c: Fixed up generator to pass the regresion tests, specifically fixing loads for longs, genCmp, and turned on the map file.
6790         (genCmp): Fixed up genCmp for the GB with longs.
6791
6792         * device/lib/gbz80/Makefile: Fixed up all the libraries to pass the regression tests.
6793
6794         * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers.
6795
6796         * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint.
6797
6798         * device/lib/_mullong.c (_mulslong): Changed to actually return a value :)
6799
6800 2001-08-30  Paul Stoffregen  <paul AT pjrc.com>
6801
6802         * added peepholes 223 to 231 to mcs51 port.  These improve code when using large model.
6803
6804 2001-08-30  Michael Hope  <michaelh AT juju.net.nz>
6805
6806         * 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.
6807
6808         * src/z80/gen.c (genPlus): Changed bad long add for gb to a fall through.
6809
6810 2001-08-29  Michael Hope  <michaelh AT juju.net.nz>
6811
6812         * link/z80/aslink.h: Fixed long file name support.  Is now based off PATH_MAX instead of a constant.
6813
6814         * src/z80/gen.c: Fixed add and sub for the case where left or right are in static space.
6815
6816 2001-08-30 Bernhard Held   <bernhard AT bernhardheld.de>
6817
6818   * sim/ucsim/configure:    little improvement of Cygwin-detection
6819   * sim/ucsim/configure.in: little improvement of Cygwin-detection
6820   * sim/ucsim/cmd.src/newcmdcl.h: include <sys/types.h> to define fd_set automated build
6821   * support/regression/tests/bug-221100.c: small changes for mcs51
6822   * support/regression/tests/bug-221168.c: small changes for mcs51
6823   * support/regression/tests/bug-227710.c: small changes for mcs51
6824   * support/regression/tests/staticinit.c: small changes for mcs51
6825   * as/mcs51/aslink.h: accept everything as symbol name in rel-files, bug fix ID 452601
6826   * as/mcs51/lklex.c:  accept everything as symbol name in rel-files, bug fix ID 452601
6827   * as/mcs51/lksym.c:  accept everything as symbol name in rel-files, bug fix ID 452601
6828
6829 $Revision$