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