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