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