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