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