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