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