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