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