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