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